Link to home
Start Free TrialLog in
Avatar of pstre
pstre

asked on

SQL statement (date format)

How do I change a date format of 1951-07-15 to 07-15-1951?

thanks!
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

SQL expert PortletPaul wrote an excellent article on SQL Server Date Styles (formats) using CONVERT() that shows this and a ton of other date formats ...
Declare @dt date = '1951-07-15'
SELECT convert(varchar, @dt ,110)

Open in new window

Avatar of pstre
pstre

ASKER

the statement above is for 1 date.  I have 1300 dates to convert.  How would I update this SQL statement to the desired date format?  

select LASTNAME, FRSTNAME, BRTHDATE, DIVISIONCODE_I, DEPRTMNT
from UPR00100
where EMPLCLAS <> 'terminated'
order by EMPLCLAS
SOLUTION
Avatar of guswebb
guswebb
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial