Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««1234»»»

Don't forget this date. Expand / Collapse
Author
Message
Posted Friday, April 2, 2010 6:16 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 3:07 AM
Points: 6,040, Visits: 8,322
*groan*


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #895552
Posted Friday, April 2, 2010 6:20 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Friday, October 17, 2014 8:13 AM
Points: 9,926, Visits: 11,188
vk-kirov (4/2/2010)
Why the question specifies the slash datetime format (yyyy/mm/dd) while all the answers are in the dash datetime format (yyyy-mm-dd)? This is completely misleading and incorrect!

Awesome! Very funny




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #895555
Posted Friday, April 2, 2010 6:24 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, May 9, 2014 12:47 AM
Points: 3,448, Visits: 4,407
By the way, which event took place on 1776-01-01?
Post #895556
Posted Friday, April 2, 2010 6:59 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 2:36 PM
Points: 2,818, Visits: 2,565
I knew the answer, but I didn't know the bit about the Gregorian calendar....interesting.
Post #895572
Posted Friday, April 2, 2010 7:46 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 10:32 AM
Points: 2,917, Visits: 2,528
My only complaint is that it is true.

Had to do a conversion back in 6.5 days, and maintain dates going back to 1600's. Had to be a bit creative on that

Good question


Steve Jimmo
Sr DBA
“If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan
Post #895616
Posted Friday, April 2, 2010 8:08 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 7:10 AM
Points: 1,577, Visits: 1,857
SanjayAttray (4/2/2010)
The ultimate guide to the datetime datatypes

http://www.karaszi.com/SQLServer/info_datetime.asp#Why1753


Sanjay,
Thank you for the excellent reference, and its explanation of "Why 1753".

-c

Post #895632
Posted Friday, April 2, 2010 9:20 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, November 12, 2013 10:53 PM
Points: 290, Visits: 714
Hi all,

This is an extrapolated question from the actual QoD, but I would like to know the reason (coz of knowledge gaining reason)

Why the 'mmm' part in the RESULT section giving a different value than I entered through the character string as shown below.

SET DATEFORMAT MDY
DECLARE @dmy datetime
SELECT @dmy = '12/31/99 12:13:12:012'
SELECT @dmy

RESULT:
1999-12-31 12:13:12.013


Thanks
big[M]


John
Post #895722
Posted Friday, April 2, 2010 9:44 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 3:07 AM
Points: 6,040, Visits: 8,322
bigM (4/2/2010)
Hi all,

This is an extrapolated question from the actual QoD, but I would like to know the reason (coz of knowledge gaining reason)

Why the 'mmm' part in the RESULT section giving a different value than I entered through the character string as shown below.

SET DATEFORMAT MDY
DECLARE @dmy datetime
SELECT @dmy = '12/31/99 12:13:12:012'
SELECT @dmy

RESULT:
1999-12-31 12:13:12.013


Thanks
big[M]

The accuracy of datetime is not to the millisecond, but to 1/300 of a second. So each second is divided into 300 slices of 3 1/3 milliseconds. And because display uses milliseconds, you see the values rounded to the millisecond: 0.000, 0.003, 0.007, 0.010, 0.013, 0.017, .....



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #895767
Posted Friday, April 2, 2010 11:07 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 9:24 PM
Points: 17,807, Visits: 15,728
Paul White NZ (4/2/2010)
I wonder how long it will be before someone complains that this QotD is misleading and incorrect since the question specifies "(yyyy/mm/dd)" format and the answers are all in YYYY-MM-DD format?



Surprised it hasn't happened yet.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #895847
Posted Friday, April 2, 2010 11:08 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 9:24 PM
Points: 17,807, Visits: 15,728
Nice question.

Thanks




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #895848
« Prev Topic | Next Topic »

Add to briefcase ««1234»»»

Permissions Expand / Collapse