DateTime값을 Unix TimeStamp로 변경

Function ConvertToUnixTimeStamp(input_datetime) 'As String 
  Dim d
  d = CDate(input_datetime) 
  ConvertToUnixTimeStamp = CStr(DateDiff("s", "01/01/1970 00:00:00", d)) 
End Function

 

Unix TimeStamp를 DateTime으로 변경

Function ConvertUnixTimeStampToDateTime(input_unix_timestamp) 'As String [regular datetime] 
  ConvertUnixTimeStampToDateTime = CStr(DateAdd("s", input_unix_timestamp, "01/01/1970 00:00:00")) 
End Function

//