dbTalk Databases Forums  

how to change the date format

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


Discuss how to change the date format in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tiffany
 
Posts: n/a

Default how to change the date format - 10-03-2005 , 01:31 AM






Hi,

I have created a DTS to import a set of data from excel to SQL table. The
date format in excel is dd/mm/yyyy HH:mm tt. I want to change to date format
in SQL to mm/dd/yyyy. May I know how to change.

I tried to use the date time string transformation properties in dts but not
successful. The sql table is still showing the same date format as in the
excel file.

Can someone help.

Thank you very much

Tiffany

Reply With Quote
  #2  
Old   
SQL
 
Posts: n/a

Default RE: how to change the date format - 10-03-2005 , 07:10 AM






Are you using a datetime field If you are then it doesn't matter how you pass
it in it will always be stored the same
Do the formatting in the front-end
For formatting output in SQL read this
http://sqlservercode.blogspot.com/20...server_21.html



"Tiffany" wrote:

Quote:
Hi,

I have created a DTS to import a set of data from excel to SQL table. The
date format in excel is dd/mm/yyyy HH:mm tt. I want to change to date format
in SQL to mm/dd/yyyy. May I know how to change.

I tried to use the date time string transformation properties in dts but not
successful. The sql table is still showing the same date format as in the
excel file.

Can someone help.

Thank you very much

Tiffany

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

Default RE: how to change the date format - 10-12-2005 , 08:45 PM



Hi,

I still could not make it. Currently my date format is in dd/MM/yyyy hh:mm
tt format. I want to change it to MM/dd/yyyy in my SQL table.

Is there a simple query I could run in the query analyser to solve the
problem.

Kindly help.

Thanks a lot!!

"Tiffany" wrote:

Quote:
Hi,

I have created a DTS to import a set of data from excel to SQL table. The
date format in excel is dd/mm/yyyy HH:mm tt. I want to change to date format
in SQL to mm/dd/yyyy. May I know how to change.

I tried to use the date time string transformation properties in dts but not
successful. The sql table is still showing the same date format as in the
excel file.

Can someone help.

Thank you very much

Tiffany

Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default RE: how to change the date format - 10-13-2005 , 12:45 AM



The presentation of dates has nothing to do with SQL Server. Internally
they are held in one format only. The presentation is all about the
client. In Query Analyser you can look to the CONVERT() function in BOL
to change the presentation style.


Allan

"Tiffany" <Tiffany (AT) discussions (DOT) microsoft.com> wrote


Quote:
Hi,

I still could not make it. Currently my date format is in dd/MM/yyyy
hh:mm
tt format. I want to change it to MM/dd/yyyy in my SQL table.

Is there a simple query I could run in the query analyser to solve the
problem.

Kindly help.

Thanks a lot!!

"Tiffany" wrote:


Hi,

I have created a DTS to import a set of data from excel to SQL table.
The
date format in excel is dd/mm/yyyy HH:mm tt. I want to change to date
format
in SQL to mm/dd/yyyy. May I know how to change.

I tried to use the date time string transformation properties in dts
but not
successful. The sql table is still showing the same date format as in
the
excel file.

Can someone help.

Thank you very much

Tiffany


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.