dbTalk Databases Forums  

Datetime 12 hours off

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Datetime 12 hours off in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeffrey K. Ericson
 
Posts: n/a

Default Datetime 12 hours off - 01-03-2006 , 12:18 PM






When using DTS to import datetime data, we find that when the source file
contains a datetime such as "2005-12-27 12:47:21AM" it converts it to
12:47PM. If I insert the above value, it gets converted correctly. I have
tried fooling with the datetime string conversion and no matter what tokens I
select, the value is 12 hours off. This only happens for AM values that have
a 12 or PM values that have a 12 hour.

TIA

Reply With Quote
  #2  
Old   
Jeffrey K. Ericson
 
Posts: n/a

Default RE: Datetime 12 hours off - 01-04-2006 , 09:11 AM






FWIW, I used activex and struffed the source into a variable and then used
the year, month, day, etc. functions to concatenate a value for the
destination.

"Jeffrey K. Ericson" wrote:

Quote:
When using DTS to import datetime data, we find that when the source file
contains a datetime such as "2005-12-27 12:47:21AM" it converts it to
12:47PM. If I insert the above value, it gets converted correctly. I have
tried fooling with the datetime string conversion and no matter what tokens I
select, the value is 12 hours off. This only happens for AM values that have
a 12 or PM values that have a 12 hour.

TIA

Reply With Quote
  #3  
Old   
mattb
 
Posts: n/a

Default RE: Datetime 12 hours off - 01-06-2006 , 01:05 PM





"Jeffrey K. Ericson" wrote:

Quote:
FWIW, I used activex and struffed the source into a variable and then used
the year, month, day, etc. functions to concatenate a value for the
destination.

"Jeffrey K. Ericson" wrote:

When using DTS to import datetime data, we find that when the source file
contains a datetime such as "2005-12-27 12:47:21AM" it converts it to
12:47PM. If I insert the above value, it gets converted correctly. I have
tried fooling with the datetime string conversion and no matter what tokens I
select, the value is 12 hours off. This only happens for AM values that have
a 12 or PM values that have a 12 hour.

TIA

Sounds like your source file has format issues. Format the source correctly
i.e. 2006-01-06 00:01:01.000 and 2006-01-06 13:01:25.000
If the source file is too large and you are constantly moving it into and
out of sql, then you might have to format it later liek you propose.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.