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

How do I set the format of a datetime datatype to day/month/year?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I would like to set the format of a datetime datatype to day/month/year, does anyone know how to do this?

Thanks for your help.

Tom Barrand
 

Convert it to a varchar type, format 101. Replace dtFld with the applicable column name:
Code:
        select convert(varchar, dtFld, 101)

Mark
 
Yes... use convert...

Tom, it will be you if you open books-online and index on Convert. The description for this function lists all of the various styles (i.e., 101) that allow you to manipulate for dates...
Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top