[PHP] MySQL datetime extraction

2003-07-19 Thread Yasir Malik
Given a date in MySQL datetime format, how do I extract the elements? That is get the month, day, year, hour, ... Thanks, Yasir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL datetime extraction

2003-07-19 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Sat, 19 Jul 2003 at 19:16, lines prefixed by '' were originally written by you. Given a date in MySQL datetime format, how do I extract the elements? That is get the month, day, year, hour, ... Thanks, Yasir Bit off topic for this list,

Re: [PHP] MySQL datetime extraction

2003-07-19 Thread Yasir Malik
What list do I go to? I just want store the elements into some variables in PHP. Yasir On Sat, 19 Jul 2003, David Nicholson wrote: Date: Sat, 19 Jul 2003 19:22:25 +0100 From: David Nicholson [EMAIL PROTECTED] To: Yasir Malik [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] MySQL

Re: [PHP] MySQL datetime extraction

2003-07-19 Thread John W. Holmes
Yasir Malik wrote: Given a date in MySQL datetime format, how do I extract the elements? That is get the month, day, year, hour, ... You could do it in the query using DATE_FORMAT(), MONTH(), YEAR(), etc. You can do it in PHP by sending the MySQL timestamp through strtotime() and then using

Re: [PHP] MySQL datetime extraction

2003-07-19 Thread Yasir Malik
PROTECTED] Subject: Re: [PHP] MySQL datetime extraction Yasir Malik wrote: Given a date in MySQL datetime format, how do I extract the elements? That is get the month, day, year, hour, ... You could do it in the query using DATE_FORMAT(), MONTH(), YEAR(), etc. You can do it in PHP