Hi, All,
I am stucked here.Would you please help as soon as you can?
LiveDate = "Mar 12,2001"
how to convert it to a int?
mktime(0,0,0,?,?,?)
Because the LiveDate is changable, I could't put a 3,12,2001 in the mktime.
Thanks a lot.
Fang
--
PHP General Mailing List (http://www.php.net/)
To
Well if you have a consistent format (like Month Day, FullYear) then you could
do this:
function get_unix_stamp($date)
{
$months = array('Jan' => 1,'Feb' => 2,
'Mar' => 3,'Apr' => 4,
'May' => 5,'Jun' => 6,
'Jul' => 7,'Aug' => 8,
So sprach Fang Li am Fri, Mar 02, 2001 at 06:58:45PM -0500:
> Hi, All,
> I am stucked here.Would you please help as soon as you can?
>
> LiveDate = "Mar 12,2001"
>
> how to convert it to a int?
$months = array( "Jan" => 1,
"Feb" => 2,
..
http://www.php.net/manual/en/function.strtotime.php
No need to code it yourself, just say $timestamp = strtotime($livedate)
Sig for a Day
Stephan Ahonen, ICQ 491101
"That's very funny Scotty, now beam down my clothes!"
Come back tomorrow for a different sig!
Backspace a single "s" to reply by em
4 matches
Mail list logo