Untitled

 avatar
unknown
plain_text
a year ago
525 B
5
Indexable
Dim day As Integer
Dim month As Integer
Dim year As Integer
Dim time As Integer
Dim dateTime As Long

' Extracting date and time components
day = CInt(Mid(Trim(Tabit(10)), 1, 2))
month = CInt(Mid(Trim(Tabit(10)), 3, 2))
year = CInt(Mid(Trim(Tabit(10)), 5, 2))
time = CInt(Mid(Trim(Tabit(10)), 7, 4))

' Constructing the 10-digit numeric value
dateTime = year * 100000000 + month * 1000000 + day * 10000 + time

' Passing the numeric value to ConvertToDateTime function
Sql_Rst![MOF08E_DATETIME] = ConvertToDateTime(dateTime)
Editor is loading...
Leave a Comment