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

Change the date format of field in a table 2

Status
Not open for further replies.

forostec

Programmer
Oct 5, 2004
13
0
0
CO
Hello, i have this doubt:

How can i predifine the format of a date field so i can work comfortable, because the format is yyyy-mm-dd and i need dd-mm-yyyy.

How can i do this?
 
SELECT DATE_FORMAT(the_date_col, '%c-%d-%Y')

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
?

That will display the date value as you want it using a select statement.

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top