Jump to content

[SOLVED] Wanna Date


phpretard

Recommended Posts

I need to print out the time but I cant figure???

 


$calls['stamp']="2009-07-26 12:02:53";

$startdate=$calls['stamp'];
$predate=explode(' ', $startdate);
$splitdate=explode('-', $predate[0]);
$Date="$splitdate[1]-$splitdate[2]-$splitdate[0]";

This prints out "07-26-2009";

 

I need the time as well.  Any help?

Link to comment
https://forums.phpfreaks.com/topic/167506-solved-wanna-date/
Share on other sites

$calls['stamp']="2009-07-26 12:02:53";

$startdate=$calls['stamp'];
$predate=explode(' ', $startdate);
$splitdate=explode('-', $predate[0]);
$splittime=explode(':', $predate[1]);
$Date="$splitdate[1]-$splitdate[2]-$splitdate[0]";
$time=$splittime[0].":".$splittime[1].":".$splittime[2];

Link to comment
https://forums.phpfreaks.com/topic/167506-solved-wanna-date/#findComment-883299
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.