List:General Discussion« Previous MessageNext Message »
From:Jesse Date:September 5 1999 8:30pm
Subject:Re: escaping characters in date format?
View as plain text  
At 01:45 PM 9/5/99 +0300, sinisa@stripped wrote:
>Jesse writes:
> > 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... seems like
> > this should be a feature for DATE_FORMAT().
> > 
> > Thanks,
> > 
> > Jesse
> > 
> > 
> > 
>
>Hi!
>
>Why would you use DATE_FORMAT to insert any string. 
>
>You can use any of string functions to INSERT or what ever in the
>output of DATE_FORMAT, because DATE_FORMAT outputs a string which
>itself can be changed in a query.
>
>Sinisa


Guess I'm not quite following your point here.  I'm not using it to insert
anything... I just want to be able to convert my date to a certain format
that includes characters that I DON"T want converted into some value. Seems
to me that using DATE_FORMAT twice on the same value with two differnt
conversion strings and then concatenating seems like an awful lot of
overhead for something so simple.

So, with mysql, what is the fastest way to convert a timestamp type field
to this format:

	Wednesday, 23 July, 1999 at 01:56 PM EDT
?

As it is, I tack on the EDT at the end (no biggie, since all the timestamps
are on the same host/tzone) but there currently is no easy way to put the
word "at" in the output format. So instead I put in a marker 'tttt' and
then use perl to change it to 'at' after SELECTing the data.

what am i missing?

Jesse

Thread
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