Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Obtaining a higher precision in timestamp
Message
 
 
To
21/03/2014 13:13:49
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01597037
Message ID:
01597075
Views:
29
>>You do need to use DateTime.Now but the point is that it has less precision than DateTime2(7) SQL Server. My question is there another .NET structure that provides the same precision as DateTime2? The Help mentions StopWatch class http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch(v=vs.110).aspx but it's not clear how to apply it to obtain current time with high precision.
>
>Yes, DateTime.Now as is would stop at the millisecond precision. I took at look at that page. As you said, it is not cleary visible as to know what has to be done. We do have this nano precision in .NET. The question is how to upscale it up to a SQL Server DateTime2 field.
>
>BTW, are you still making use of Date.Now or you just use DateTime.Now everywhere needed?

In my code I think I always use DateTime.Now
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform