What is the datatype on that column? If it's a string, then you're probably
not going to be able to convert it, however, if it is truly a date/time
field, then what you're seeing is however the application is presenting it
as SQL stores datetimes in a robust format that can be converted to whatever
final format you want to see it in.
For mm/dd/yyyy, use convert(varchar(10), yourdatefield, 101)
BOL has a nice chart of conversions from US to European :)
If you have any questions or concerns, please let me know them.
Margaret Norkett
Database Administrator
Good communication is as stimulating as black coffee and
just as hard to sleep after.
Anne Morrow Lindbergh, 'Gift From the Sea'
~
-----Original Message-----
From: Jim Hill
[mailto:mssqldba-ezmlmshield-x76494370.[Email address protected]
Sent: Thursday, August 30, 2007 1:38 PM
To: LazyDBA Discussion
Subject: dates
Anyone have an easy way to convert a column in a table from date format
mmm-dd to mm/dd/yyyy
Jan-04 to 1/1/2004
Thank you
Jim
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.12.12 - Release Date: 8/29/2007 12:00
AM
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page