Link to home
Start Free TrialLog in
Avatar of GPSPOW
GPSPOWFlag for United States of America

asked on

Convert dateTime to Date output

I have a field in a datetime format.  When I do an insert into an existing table with a date field, I want the format to be 'MM/DD/YYYY'

I have the following statement:

convert(date,LastBilledDateTime,101) as LBDT.

When I look at the output the format is YYYY-MM-DD.

How can force it be MM-DD-YYYY?  The LastBilledDateTime is stored as DateTime.

Thanks

Glen
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia 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
Avatar of GPSPOW

ASKER

I see that now.  

Thanks

glen
no problem, you might find this page by Tibor Karaszi useful:

"The ultimate guide to the datetime datatypes"