Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to load Date columns in consistent manner


How to load Date columns in consistent manner

Author
Message
sqlstud
sqlstud
SSC Journeyman
SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)

Group: General Forum Members
Points: 99 Visits: 237
Hi,

I am loading the table from Excel source using SSIS 2005.

Excel contains one of the columns as Exp_Date and its examples values are

10/09/2010 17:00:51
11/09/2010 11:45:16
11/09/2010 11:45:16
13/09/2010 10:07:59
13/09/2010 10:07:59
13/09/2010 10:07:59
14/09/2010 10:44:59
15/09/2010 10:44:59
16/09/2010 14:19:25


In table, for some columns it is loading fine. But for some columns it is loading in an inconsistent manner, i.e. a date that should be loading as ‘10/09/2010’ is actually loading as ‘09/10/2010’.

Please advise how to load the date column values into table as it is in Excel file.

Regards
SqlStud
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8261 Visits: 14368
sqlstud (1/16/2013)
Hi,

I am loading the table from Excel source using SSIS 2005.

Excel contains one of the columns as Exp_Date and its examples values are

10/09/2010 17:00:51
11/09/2010 11:45:16
11/09/2010 11:45:16
13/09/2010 10:07:59
13/09/2010 10:07:59
13/09/2010 10:07:59
14/09/2010 10:44:59
15/09/2010 10:44:59
16/09/2010 14:19:25


In table, for some columns it is loading fine. But for some columns it is loading in an inconsistent manner, i.e. a date that should be loading as ‘10/09/2010’ is actually loading as ‘09/10/2010’.

Please advise how to load the date column values into table as it is in Excel file.

Regards
SqlStud

Which driver are you using? The built-in driver? Please post the connection string so we can see the properties? Post the Excel file as an attachment to this thread as well.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
MMartin1
MMartin1
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1122 Visits: 2015
You can import the data as a string and in the dataflow manipulate the string in a derived column transformation to put it into yyyymmdd format, and append that to the time portion.

This is the universal standard for date string and will import nicely into your datetime column, of your destination.

----------------------------------------------------
How to post forum questions to get the best help
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search