English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

to format a date

"SELECT DATE_FORMAT(NOW(), '%M %e, %Y - %r) as todaysDate";

would be August 3, 2007 - 09:16:35

datetime formats are YYYY-MM-DD HH:MM:SS
use your standard INSERT and UPDATE commands to enter a date. To add a date to another date (say to make a deadline) use DATE_ADD(yourdate, INTERVAL whatyouwant added) ie 1 MINUTE, 3 12 DAY_HOUR (3 1/2 days)

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html is all the functions and the values to put into a DATE_FORMAT()

2007-08-03 02:22:10 · answer #1 · answered by Big D 4 · 0 0

Take a look at this link

2007-07-31 06:04:19 · answer #2 · answered by AnalProgrammer 7 · 0 0

fedest.com, questions and answers