List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:May 11 1999 4:39pm
Subject:Date_format() does not ignore letters without %
View as plain text  
>>>>> "Mike" == Mike Little <mike@stripped> writes:

Mike> Apologies for not using mysql-bug (it requires a *nix machine with a configured
> mail 
Mike> system)

Mike> I have discovered a problem with date_format(), it is interpreting formatting
> chars
Mike> it 'knows' even without a preceding '%'

<cut>

That's correct.

Mike> UPDATE:
Mike> Having looked at the source in item_timefunc.cc
Mike> It looks like the manual (3.22.22) is ahead of the source and in fact '%' is not
> 
Mike> required at all.

Thats right.

Mike> Which I've just verified...

mysql> SELECT DATE_FORMAT(NOW(),'W, e M Y T ') as today, VERSION() \G
Mike> *************************** 1. row ***************************
Mike>     today: Tuesday, 11 May 1999 14:46:24 
Mike> version(): 3.22.20a
Mike> 1 row in set (0.00 sec)

Mike> So I guess the leading % is going to be in the next version.

Yes;  In MySQL 3.23 we will require one to use '%' in DATE_FORMAT.
This will make DATE_FORMAT() much more usefull!

Mike> And how about an extension to get the timezone of the server machine into the 
Mike> Date_Format() string?

I have to check up how to get this information in a portable way.

Regards,
Monty
Thread
Date_format() does not ignore letters without %Mike Little11 May
  • Re: Date_format() does not ignore letters without %Christian Mack11 May
  • Date_format() does not ignore letters without %Michael Widenius11 May