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 11:09 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 21,619, Visits: 15,275
Voitek (4/2/2010)
I did a cast(0 as datetime), but then I thought hmm. can negatives be converted to datetime? I picked 64000, but that failed, so then I went incrementally to -53690 beyond which the cast fails.
I don't think the QOD is misleading. The oldest date you can store is -53690, which is 1-1-1753.


Nice information. Thanks for providing it.




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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #895849
Posted Friday, April 2, 2010 11:24 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 10:26 AM
Points: 11,194, Visits: 11,136
CirquedeSQLeil (4/2/2010)
Surprised it hasn't happened yet.

vk-kirov covered it!




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #895864
Posted Friday, April 2, 2010 11:33 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 21,619, Visits: 15,275
Paul White NZ (4/2/2010)
CirquedeSQLeil (4/2/2010)
Surprised it hasn't happened yet.

vk-kirov covered it!


I found that comment funny.




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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #895876
Posted Friday, April 2, 2010 12:28 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 12:57 PM
Points: 23,215, Visits: 31,897
I found this one fairly easy. Good discussion, which adds to question.



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 #895923
Posted Monday, April 5, 2010 2:30 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, August 14, 2014 12:26 AM
Points: 5,334, Visits: 1,383
I didn't knew it.. Great one to know...


Post #896579
Posted Monday, April 5, 2010 9:48 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, July 10, 2014 12:49 PM
Points: 1,676, Visits: 1,754
This is a very interesting question, thank you Carla. I knew that 1753-01-01 was selected as the first available date, but had no clue why the SQL Server team chose it. The number -53690 does not appear to be of any significance, so I learned something new today.

Oleg
Post #896801
Posted Monday, April 5, 2010 11:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, January 27, 2011 2:44 AM
Points: 3, Visits: 7
same with me ...whenever i selects date columns it shows same..
Post #897325
Posted Tuesday, April 6, 2010 9:47 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 21,619, Visits: 15,275
Lynn Pettis (4/2/2010)
I found this one fairly easy. Good discussion, which adds to question.



I have to admit, I did not find this one as easy. I did have to do some checking and research.




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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #897658
Posted Thursday, April 8, 2010 8:20 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 2:13 AM
Points: 1,051, Visits: 1,415
Any idea what the latest date is? I got as far as 500,000 days into the future before i gave up, I doubt i'd have much use for this unless i'm using DBCC timewarp though
Post #899606
Posted Thursday, April 8, 2010 8:39 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 6:34 AM
Points: 1,566, Visits: 1,851
From MS SQL documentation:
datetime: January 1, 1753, through December 31, 9999
smalldatetime: January 1, 1900, through June 6, 2079

Note:
datetime is stored as two 4-byte integers for days from 1/1/1900 and milliseconds since midnight.
smalldatetime is stored as two 2-byte integers for days from 1/1/1900 and minutes since midnight.
Post #899633
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse