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
GPSPOWAsked:
Who is Participating?
 
PortletPaulConnect With a Mentor Commented:
A datetime field does NOT store information "in a format". Datetime information is stored as numbers to minimize storage and easily facilitate date arithmetic.

It is a human need to see date in a specific format (and this is affected by culture you want MM/DD/YYYY whereas I would much prefer DD/MM/YYYY).
0
 
GPSPOWAuthor Commented:
I see that now.  

Thanks

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

"The ultimate guide to the datetime datatypes"
0
All Courses

From novice to tech pro — start learning today.