To convert a datetime string value like "YYYY-MM-DD HH:MM:SS" to a Unix timestamp (the seconds from 01/01/1970 to the input datetime) You can use a conversion function as the following:
Function ConvertToUnixTimeStamp(input_datetime) 'As String
Dim d
d = CDate(input_datetime)
ConvertToUnixTimeStamp = CStr(DateDiff("s", "01/01/1970 00:00:00", d))
End FunctionThen, to get back the datetime from the Unix timestamp use the following code:
Function ConvertUnixTimeStampToDateTime(input_unix_timestamp) 'As String [regular datetime]
ConvertUnixTimeStampToDateTime = CStr(DateAdd("s", input_unix_timestamp, "01/01/1970 00:00:00"))
End Function