MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:September 5 1999 2:51pm
Subject:Re: escaping characters in date format?
View as plain text  
On Sun, 1999-09-05 00:04:02 -0600, Jesse wrote:
> Although there doesn't seem to be any documented (for 3.21.29-gamma
> for Win32) escapes for the date_format function format string, would
> there be a way to easily include, say, "at" in the format without
> having the 'a' changed into its corresponding format value?  "\"
> doesn't seem to work...

I don't think you can do this with MySQL V3.21.x oder V3.22.x, but for
V3.23.x the Manual says:

| Formats the date value according to the format string. The following
| specifiers may be used in the format string:
|  %M   Month name (January..December) 
|  %W   Weekday name (Sunday..Saturday) 
|  %%   A literal `%'. 
| All other characters are just copied to the result without
| interpretation.
| As of MySQL 3.23, the % is required before a format specifier
| characters. In earlier versions of MySQL, % was optional.

So I guess starting with MySQL V3.23.x you can do what you want ...

Martin Ramsch <m.ramsch@stripped> <URL: >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
escaping characters in date format?Jesse5 Sep
  • Re: escaping characters in date format?sinisa5 Sep
    • Re: escaping characters in date format?Jesse6 Sep
      • Re: escaping characters in date format?Martin Ramsch6 Sep
  • Re: escaping characters in date format?Martin Ramsch5 Sep