Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
TIME/DATE Datatypes Accuracy.
TIME/DATE Datatypes Accuracy.
Rate Topic
Display Mode
Topic Options
Author
Message
SQL*
SQL*
Posted Sunday, January 27, 2013 11:18 PM
SSC-Addicted
Group: General Forum Members
Last Login: Yesterday @ 5:12 AM
Points: 414,
Visits: 1,451
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
Kingston Dhasian
Kingston Dhasian
Posted Monday, January 28, 2013 12:41 AM
SSCrazy
Group: General Forum Members
Last Login: Today @ 4:40 AM
Points: 2,198,
Visits: 4,148
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 NanoSeconds
Similarly, I hope you can understand the meaning of other accuracy constraints for TIME/DATE data types.
Kingston Dhasian
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1412213
SQL*
SQL*
Posted Monday, January 28, 2013 1:45 AM
SSC-Addicted
Group: General Forum Members
Last Login: Yesterday @ 5:12 AM
Points: 414,
Visits: 1,451
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 NanoSeconds
Similarly, 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
Lynn Pettis
Lynn Pettis
Posted Monday, January 28, 2013 10:23 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 3:18 AM
Points: 21,588,
Visits: 27,375
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.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1412759
SQL*
SQL*
Posted Tuesday, January 29, 2013 2:03 AM
SSC-Addicted
Group: General Forum Members
Last Login: Yesterday @ 5:12 AM
Points: 414,
Visits: 1,451
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
anthony.green
anthony.green
Posted Tuesday, January 29, 2013 2:15 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Are you familiar with fractions of time?
10th of a second
100th of a second
1000th of a second
etc.
Well a nano second is 1 billionth of a second.
So time is actuate to 100 billionth's of a second
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1412824
SQL*
SQL*
Posted Tuesday, January 29, 2013 3:00 AM
SSC-Addicted
Group: General Forum Members
Last Login: Yesterday @ 5:12 AM
Points: 414,
Visits: 1,451
anthony.green (1/29/2013)
Are you familiar with fractions of time?
10th of a second
100th of a second
1000th of a second
etc.
Well a nano second is 1 billionth of a second.
So time is actuate to 100 billionth's of a second
Now i got clear picture, as follows:
1sec = 10^9 nanoseconds
But 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
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.