Convert .NET Ticks to SQL Server DateTime

后端 未结 7 845
攒了一身酷
攒了一身酷 2020-11-30 10:10

I am saving a TimeSpan (from .NET) value in my db as BIGINT in SQL Server (saving the Ticks property). I want to know how to convert this BIG

相关标签:
7条回答
  • 2020-11-30 11:05

    A TimeSpan is not a date, and saving it as such may cause confusion in the future.

    Is there a reason you can't simply save the ticks to an integer field and not change its meaning?

    0 讨论(0)
提交回复
热议问题