January 21, 200620 yr Hi, Anyone know how to create a Unix timestamp that I can use for importing into my SQL server? (10 digit number, i.e. 2147483647) Thanks!
January 21, 200620 yr Yes, but it is not necessarily a 10-digit number, just the number of seconds since Jan 1, 1970. And you're supposed to convert it from your local time to UTC, so: Let ( [ unixEpoch = Timestamp ( Date ( 1 ; 1 ; 1970 ) ; Time (0 ; 0 ; 0 ) ) ; offset = Time ( <> ; 0 ; 0 ) ] ; GetAsNumber ( yourTimestamp - offset - unixEpoch ) ) where yourOffsetFromUTC is the difference, in hours, between your local time and UTC. For example, for EASTERN STANDARD TIME enter -5, for EASTERN DAYLIGHT SAVING TIME enter -4.
Create an account or sign in to comment