In my opinion DateSerial isn't working as it should.
from the manual,
Function DateSerial(Year As Integer, Month As Integer, Day As Integer) As DateTime
' Converts a date given by year, month and day into a big number.
Returning a big number in a DateTime isn't working.
Made a small function to calculate Unix Timestamp,
- Code: Select all
Function UnixTStamp(uDate As DateTime) As Integer
Dim sDate As DateTime
Dim Ustamp As Integer
sDate = DateValue("1970-01-01 00:00:00")' start of date Unix timestamp
Return DateDiff(sDate, uDate, "s")
End Function
Replace DateSerial with this function and perhaps is does the trick for you.