Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2009, 03:45 PM
Registered User
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pre 1900 dates in SQL Server and SSIS

This is my 1st post on this excelent forum
I wish to know how to Deal with Pre 1900 dates in SQL Server and SSIS
how do I do this or which is the most apropriate book to consult
I have tried to load dates pre 1900 through SSIS however SSIS throws an error
Any help will be most appreciated
 
Old February 3rd, 2009, 06:19 PM
jminatel's Avatar
Wrox Staff
Points: 18,059, Level: 58
Points: 18,059, Level: 58 Points: 18,059, Level: 58 Points: 18,059, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

You didn't specify which SQL Server version but I took a guess on 2005 and moved your question to the forum for that.
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click on their post!
 
Old February 4th, 2009, 03:23 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

I would *GUESS* that you used a SHORTDATETIME field, and indeed it can NOT accept dates prior to 1900.

Look here:
http://msdn.microsoft.com/en-us/libr...7(SQL.80).aspx

Change your field to just DATETIME, instead of SMALLDATETIME, and you can go back to 1753.

(The reason SQL Server doesn't allow dates before that is because it doesn't want to have to figure out the difference between Roman dates and Gregorian dates. But it's a totally BOGUS reason. 1753 is when England (and the Colonies, that would become the USA) changed to the Gregorian calendar. But many many countries changed before that date and several changed after that. So it's a bogus USA-centric decision on SQL Server's part.)

(And why ANYBODY would use a SMALLDATETIME field is beyond me. Oh, sure, there are lots of apps where it will "do", but what are you saving? A whole 4 bytes per record. Whoopee.)





Similar Threads
Thread Thread Starter Forum Replies Last Post
creating ssis packagte for sql server to sql serer Laxmikant_it ASP.NET 3.5 Professionals 0 November 26th, 2008 12:23 AM
SQL Server 2005 SSIS and ODBC Tomas Finnhult SQL Server 2005 0 May 29th, 2007 11:05 AM
SQL SSIS Send Mail Task mstoler SQL Server 2005 0 August 8th, 2006 07:35 AM
Comparing Dates in SQL Server 7 chiefouko SQL Server 2000 8 August 6th, 2003 06:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.