Jump to content

how to eliminate the time ?


zgkhoo

Recommended Posts

You can also use the explode() function:

<?php
list($date , $dmy) = explode(' ',$row['Expiredate']);
?>

 

Personally, since we're dealing with dates, I would use the date() and strtotime() functions:

<?php
$date = date('Y-m-d',strtotime($row['Expiredate']));
?>

 

You can also use MySQL directly to return the correct format, but I don't know the correct incantation off the top of my head. :)

 

Ken

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.