[thelist] MySQL date format

Hassan Schroeder hassan at webtuitive.com
Mon Nov 28 09:14:12 CST 2005


Symeon Charalabides wrote:
>>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

> 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")

Looking at the above, I'm guessing you want to "add a day" to the
date column in your table; but what does/should the output look
like for the dates '2005-11-30' and '2005-12-31'?

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                          dream.  code.





More information about the thelist mailing list