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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -