[thelist] MySQL date format

Hassan Schroeder hassan at webtuitive.com
Mon Nov 28 13:02:26 CST 2005


Symeon Charalabides wrote:

>>Of course this format fails to take into account the last day of the 
>>month or year (giving you e.g. Saturday, 31 - 1 December 2005), so you 
>>would probably need to improve this.  All in all, it's usually better to 
>>use PHP (or whatever) to format your dates for ouput.
> 
> True, this is what I ended up doing. I was wondering if it was possible to bring 
> up such a string (or some variation thereof) with a simple SELECT, as it's faster 
> than digging up the conventional date, then formatting it with PHP. As it turns 
> out this isn't possible as the SELECT needed is so complex that PHP probably does 
> it faster. 

Not necessarily, but you never answered the question -- what do
you expect the output for e.g. '2005-11-30' to look like?

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

                          dream.  code.





More information about the thelist mailing list