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

Date with format d/m/yyyy

Status
Not open for further replies.

simma

Programmer
Sep 11, 2001
398
US
How do we convert datetime to format d/m/yyyy
(9/2/2004)
Thanks
 
Thanks..
But it gives mm/dd/yyyy
 
nop, I tried evrything from 100-112
 
how about this?

select convert(varchar(5), day(getdate())) + '/' + convert(varchar(5), month(getdate())) + '/' + convert(varchar(5), year(getdate()))



Andel
andel@barroga.net
 
Just for what it's worth. Dates in SQL server datetime or smalldatetime format don't *have* an inherent md or dm order or format. So it's all in how you display it.

Have you checked out the setting in your database,

SET DATEFORMAT

?

-------------------------------------
It is better to have honor than a good reputation.
(Reputation is what other people think about you. Honor is what you know about yourself.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top