Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Changing dates from American format to English format

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-11-29 : 05:07:07
writes "Hi,

I have a client who has their date format set to American and therefore has loads of wrong dates. Through Query Analyser I need to swap over the month and day parts of the date. Is there an easy way to do this???

Thanks

Andy"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-11-29 : 05:17:34
that's the job for presentation layer to do.
to that you can use Convert function:


set dateformat ymd
declare @date datetime
set @date = 20040623
select convert(varchar(10), @date, 103) -- English
select convert(varchar(10), @date, 101) -- USA


Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -