Link to home
Start Free TrialLog in
Avatar of JElster
JElsterFlag for United States of America

asked on

sql server - convert DATETIME to formated string

Hi..
I have the following DATETIME field.   PURCHASED_DATE = 2013-01-02 09:00:00.000
I need to return the field / data in the following format

as

'Wed  Jan 2  9:00 AM'

thx
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

SELECT DATENAME(dw, GETDATE()) + ' ' + CONVERT(nvarchar(50), getdate(), 100)
SOLUTION
Avatar of James Murrell
James Murrell
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
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