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
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,
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
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
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
5 matches
Mail list logo