Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datetiem Value to mm/dd/yyyy format

Status
Not open for further replies.

jshanoo

Programmer
Apr 2, 2002
287
IN
Hi all,
Please take the following query:

Select date as Dt1 ,convert(smalldatetime,date,110), count(*) from feedback
where TAg='L'
Group by Date
Order by date
-----------------
I am using the convert but it snot converting,
field name is 'Date' i am forced to do this, since it is imported from dbf, so i have to keep using it ahead,
type is 'datetime' .

I need the 'date' field to be displayed in 'mm/dd/yyyy' in the result set.
any hints


Best Regards
John Philip


*** Even the Best, did the Bad and Made the Best ***

John Philip
 
style 110, which you used, returns the format mm-dd-yyyy (hyphens not slants).

AtomicWedgie shows you the correct conversion style code. Please refer to the Books OnLine, use the Index tab, enter CONVERT and then choose the option that lists Transact SQL for the Location.

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top