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
Post a Comment