Language: Add UnixTime Converter
This commit is contained in:
parent
cc24b8eb31
commit
b00ffff0d9
@ -228,12 +228,12 @@ Public Class frmFlowSearch
|
||||
}
|
||||
Dim oShortGuid = Guid.NewGuid()
|
||||
Dim oWindowGuid = $"FLOWSEARCH-{My.User.Name}"
|
||||
Dim oParams = New DocumentResultParams() With {
|
||||
Dim oParams = New DocumentResultList.Params() With {
|
||||
.WindowGuid = oWindowGuid,
|
||||
.Results = New List(Of DocumentResultList) From {
|
||||
New DocumentResultList() With {
|
||||
.Title = "FlowSearchResult",
|
||||
.Datatable = pDTRESULT
|
||||
.DataTable = pDTRESULT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -951,10 +951,10 @@ Public Class frmSearchStart
|
||||
If oDTSearchResult.Rows.Count > 0 Then
|
||||
Dim oShortGuid = Guid.NewGuid()
|
||||
Dim oWindowGuid = $"{SEARCH_ID.ToString}-{My.User.Name}"
|
||||
Dim oParams = New DocumentResultParams() With {
|
||||
Dim oParams = New DocumentResultList.Params() With {
|
||||
.WindowGuid = oWindowGuid,
|
||||
.Results = New List(Of DocumentResultList) From {
|
||||
New DocumentResultList() With {
|
||||
.Results = New List(Of DocumentResultList.DocumentResult) From {
|
||||
New DocumentResultList.DocumentResult() With {
|
||||
.Title = SelectedTab.Text,
|
||||
.Datatable = oDTSearchResult
|
||||
}
|
||||
|
||||
12
Modules.Language/DateTimeEx.vb
Normal file
12
Modules.Language/DateTimeEx.vb
Normal file
@ -0,0 +1,12 @@
|
||||
Imports System.Runtime.CompilerServices
|
||||
|
||||
Public Module DateTimeEx
|
||||
Const UnixEraStartTicks As Long = 621355968000000000
|
||||
<Extension> Public Function UnixTimestamp(value As Date) As Long
|
||||
Dim UnixEraTicks = value.Ticks - UnixEraStartTicks
|
||||
Return UnixEraTicks \ 10000
|
||||
End Function
|
||||
Public Function DateFromUnix(timestamp As Long) As Date
|
||||
Return New Date(UnixEraStartTicks + timestamp * 10000)
|
||||
End Function
|
||||
End Module
|
||||
@ -75,6 +75,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DataTableEx.vb" />
|
||||
<Compile Include="DateTimeEx.vb" />
|
||||
<Compile Include="InvalidChars.vb" />
|
||||
<Compile Include="Utils.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user