[thelist] MySQL date format
Symeon Charalabides
symeon at systasis.com
Mon Nov 28 08:18:00 CST 2005
> I've a DATE column in MySQL with a row, say "2005-12-1". I want to return
> the following string:
>
> Thursday, 1 - 2 December 2005
>
> Is that possible with MySQL functions, or do I have to get PHP to do that?
>
> You can use MySQL's DATE_FORMAT() function
> http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Thanks, I know how to use DATE_FORMAT to return "Thursday, 1 December 2005". It's
the " - 2 " in my original request I'm not sure it's possible. I tried several
variations of
DATE_FORMAT(day, "%W, %e - %e+1 %M %Y")
but to no avail.
Symeon Charalabides (cosmopolite trainee)
-------------------------------------------------
http://www.systasis.com
More information about the thelist
mailing list