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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert datetime field to dd/mm/yyyy 1

Status
Not open for further replies.

mrp9090

Programmer
May 22, 2006
71
GB
I have a datetime field that I want to convert to dd/mm/yyyy format in my query. I have tried to cast as varchar for dd, mm, yyyy, but I don't get the leading zeroes. Can anybody help?
 
Select Convert(VarChar(10), GetDate(), 103)

Hint: The 103 is the important part

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top