List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:August 12 1999 8:05am
Subject:Re: Date Candy?
View as plain text  
On Do, 1999-08-12 15:46:21 -0700, Mick Hanna wrote:
> 1999-08-09 00:46:20
> 
> This is a smaple of a datestamp entered into my db..
> 
> How can I call this (what can i use?) to show it differently?

That's easily done within MySQL with the function DATE_FORMAT, e.g.

  mysql> SELECT DATE_FORMAT('1999-08-09 00:46:20', '%D %b %Y %r');
  +---------------------------------------------------+
  | DATE_FORMAT('1999-08-09 00:46:20', '%D %b %Y %r') |
  +---------------------------------------------------+
  | 9th Aug 1999 12:46:20 AM                          |
  +---------------------------------------------------+

Also see the MySQL manual chapter "7.3.11 Date and time functions", e.g.
<URL: http://www.mysql.com/Manual_chapter/manual_Reference.html#Date_and_time_functions
>

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
Date Candy?Mick Hanna12 Aug
  • Re: Date Candy?Martin Ramsch12 Aug