DateTime's representation in milliseconds?

后端 未结 7 944
遥遥无期
遥遥无期 2020-11-30 05:21

I have a SQL-server timestamp that I need to convert into a representation of time in milliseconds since 1970. Can I do this with plain SQL? If not, I\'ve extracted it into

7条回答
  •  死守一世寂寞
    2020-11-30 05:48

    There are ToUnixTime() and ToUnixTimeMs() methods in DateTimeExtensions class

    DateTime.UtcNow.ToUnixTimeMs()

提交回复
热议问题