Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 TIME/DATE Datatypes Accuracy. Rate Topic Display Mode Topic Options
Author
 Message
 Posted Sunday, January 27, 2013 11:18 PM
 SSC-Addicted Group: General Forum Members Last Login: Monday, November 28, 2016 11:18 PM Points: 424, Visits: 1,717
 Hi all,What is the meaning of "Accuracy of 100 nonseconds" in case TIME data type in sql server 2008. And for every date/time data type there is an Accuracy constraint what does it means?Thanks.
Post #1412189
 Posted Monday, January 28, 2013 12:41 AM
 SSCrazy Group: General Forum Members Last Login: Thursday, December 1, 2016 4:52 AM Points: 2,917, Visits: 4,954
 A nanosecond (ns) is one billionth of a second (10−9 or 1/1,000,000,000 s)...( From Wikipedia http://en.wikipedia.org/wiki/Nanosecond )As an example, a variable with data type TIME may store a data like 08:31:50.0000005 which means the time now is 08 Hours, 31 Minutes, 50 Seconds and 500 NanoSecondsSimilarly, I hope you can understand the meaning of other accuracy constraints for TIME/DATE data types. Kingston DhasianHow to post data/code on a forum to get the best help - Jeff Modenhttp://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1412213
 Posted Monday, January 28, 2013 1:45 AM
 SSC-Addicted Group: General Forum Members Last Login: Monday, November 28, 2016 11:18 PM Points: 424, Visits: 1,717
 Kingston Dhasian (1/28/2013)A nanosecond (ns) is one billionth of a second (10−9 or 1/1,000,000,000 s)...( From Wikipedia http://en.wikipedia.org/wiki/Nanosecond )As an example, a variable with data type TIME may store a data like 08:31:50.0000005 which means the time now is 08 Hours, 31 Minutes, 50 Seconds and 500 NanoSecondsSimilarly, I hope you can understand the meaning of other accuracy constraints for TIME/DATE data types.Thanks for ur reply,But can u say it in words, in the above example 5*100 is the nanoseconds?Like that if accuracy is 1 day, ex: 28th, jan, 2013, then 28*1 = 28...so on
Post #1412237
 Posted Monday, January 28, 2013 10:23 PM
 SSC-Insane Group: General Forum Members Last Login: Friday, December 2, 2016 4:50 PM Points: 23,515, Visits: 37,731
 It means the time reported is accurate to 100 nanoseconds. You won't get any time values less than that reported.If you need more information you may want to try looking up the TIME datatype in the SQL Server Books Online. It should be able to provide you with additional information.
Post #1412759
 Posted Tuesday, January 29, 2013 2:03 AM
 SSC-Addicted Group: General Forum Members Last Login: Monday, November 28, 2016 11:18 PM Points: 424, Visits: 1,717
 Lynn Pettis (1/28/2013)It means the time reported is accurate to 100 nanoseconds. You won't get any time values less than that reported.If you need more information you may want to try looking up the TIME datatype in the SQL Server Books Online. It should be able to provide you with additional information.Thanks for ur replay,But i'm not able to catch the exact point of "Accuracy", and i have looked into the MSDN but there is also no such information on.please clarify me.
Post #1412820
 Posted Tuesday, January 29, 2013 2:15 AM
 SSCertifiable Group: General Forum Members Last Login: Thursday, September 1, 2016 2:56 AM Points: 5,969, Visits: 6,067
 Are you familiar with fractions of time?10th of a second100th of a second1000th of a secondetc.Well a nano second is 1 billionth of a second.So time is actuate to 100 billionth's of a second
Post #1412824
 Posted Tuesday, January 29, 2013 3:00 AM
 SSC-Addicted Group: General Forum Members Last Login: Monday, November 28, 2016 11:18 PM Points: 424, Visits: 1,717
 anthony.green (1/29/2013)Are you familiar with fractions of time?10th of a second100th of a second1000th of a secondetc.Well a nano second is 1 billionth of a second.So time is actuate to 100 billionth's of a secondNow i got clear picture, as follows:1sec = 10^9 nanosecondsBut in sql server the time's precession is 10^7, so 10^9 - 10^7 = 10^2 (100 is the part of the nanoseconds). For example as one of our author mentioned in this chain 12.12.34.0000005 this is 000000500 (500) nanosecond. I believe it is correct.
Post #1412848

 Permissions