March 16, 2013 at 2:09 pm
Comments posted to this topic are about the item DATETIME - 4
March 16, 2013 at 2:31 pm
Nice question, and fine explanation, but that bit about "59.005" seems to have come from a different than the rest. ๐
Tom
March 17, 2013 at 10:32 pm
L' Eomot Inversรฉ (3/16/2013)
Nice question, and fine explanation, but that bit about "59.005" seems to have come from a different than the rest. ๐
+1
May be, because, it's monday it looked like too much english and a long script to read . Then, I finally decided to go on with the question .. In the end, I realised it is a question about datetime millisecond precision :w00t:
eventually it was a worthy read ,a simple query with calm mind ...:-P
thanks for the question
Edit: english
~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one :ermm:
March 17, 2013 at 11:07 pm
demonfox (3/17/2013)
L' Eomot Inversรฉ (3/16/2013)
Nice question, and fine explanation, but that bit about "59.005" seems to have come from a different than the rest. ๐+1
May be, because, it's monday it looked like too much english and a long script to read . Then, I finally decided to go on with the question .. In the end, I realised it is a question about datetime millisecond precision :w00t:
eventually it was a worthy read ,a simple query with calm mind ...:-P
thanks for the question
Edit: english
+2
Also good to see sql 2012 function "DATETIMEFROMPARTS" as well.
Thanks Ron!
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
March 17, 2013 at 11:13 pm
very good question to start of the week.. ๐
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 17, 2013 at 11:31 pm
kapil_kk (3/17/2013)
very good question to start of the week.. ๐
:-):-):-)
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
March 18, 2013 at 3:07 am
Awesome Qtod,thank you for posting.
(I am bursting with my doubts... but no idea where to begin...)
so to say... there will be no row/s in the datetime column where it ends with other than these .000, .003 or .007. Like .004 turns to .003 or .129 turns in to .127.... ? .002 changes to .003?
My main doubt is... in the BOL it says under property as "accuracy" and then the corresponding value starts with " rounded to increment..." ? what type of accuracy is this? :crazy:
edit; fixed the "property" spell
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
March 18, 2013 at 4:10 am
Raghavendra Mudugal (3/18/2013)
Awesome Qtod,thank you for posting.(I am bursting with my doubts... but no idea where to begin...)
so to say... there will be no row/s in the datetime column where it ends with other than these .000, .003 or .007. Like .004 turns to .003 or .129 turns in to .127.... ? .002 changes to .003?
My main doubt is... in the BOL it says under property as "accuracy" and then the corresponding value starts with " rounded to increment..." ? what type of accuracy is this? :crazy:
edit; fixed the "property" spell
๐ I found this out while migrating data on a datetime, that too from sybase datetime (i think it's 3 6 9 in millisecond for sybase datetime) , had to convert it to datetime2 for exactness..
yes, it is mentioned in bol ..the accuracy and the behaviour and cost fo this accuracy ...
so use as you wish .. and ignore as you wish ..
~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one :ermm:
March 18, 2013 at 4:13 am
demonfox (3/18/2013)
so use as you wish .. and ignore as you wish ..
???? :w00t:
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
March 18, 2013 at 5:04 am
Thanks for the question Ron. I usually do the QOTD within ten minutes of rising in the morning. So, it helps when it's short. Or, as in this case, on a basic topic. Or, when I guess correctly! :smooooth:
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
March 18, 2013 at 5:30 am
Thanks for the question. I learned this precision rounding from March 12, inner join question from Archie Flockhart's comment. ๐
--------------------------------------------------------------------------------------
Hai Ton
My Db4Breakfast blog.
March 18, 2013 at 5:31 am
This was removed by the editor as SPAM
March 18, 2013 at 7:31 am
demonfox (3/17/2013)
L' Eomot Inversรฉ (3/16/2013)
Nice question, and fine explanation, but that bit about "59.005" seems to have come from a different than the rest. ๐+1
May be, because, it's monday it looked like too much english and a long script to read . Then, I finally decided to go on with the question .. In the end, I realised it is a question about datetime millisecond precision :w00t:
eventually it was a worthy read ,a simple query with calm mind ...:-P
thanks for the question
Edit: english
Same here... but apparently I didn't consume enough coffee before I tried to answer this one... gah my head hurts.
March 18, 2013 at 8:13 am
Nice question.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 18, 2013 at 8:27 am
I'm curious: What was the point of the cursor-like WHILE and incrementing the ID by 3? Just Obfuscation? Why didn't you just write the query as:
SELECT ID AS 'Select number', DATETIMEFROMPARTS ([Year],M,D,H,Mi,S,Ms) AS 'Datetime'
,CAST(S AS CHAR(2)) + ':' + CAST(Ms AS CHAR(3)) AS 'Original seconds input'
FROM #T
Viewing 15 posts - 1 through 15 (of 29 total)
You must be logged in to reply to this topic. Login to reply