c# - DateTime's representation in milliseconds? -


i have sql-server timestamp need convert representation of time in milliseconds since 1970. can plain sql? if not, i've extracted datetime variable in c#. possible millisec representation of ?

thanks,
teja.

you're trying convert unix-like timestamp, in utc:

yourdatetime.touniversaltime().subtract(     new datetime(1970, 1, 1, 0, 0, 0, datetimekind.utc)     ).totalmilliseconds 

this avoids summertime issues, since utc doesn't have those.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -