I have an html form that uses jQuery datetimepicker to send a value to a database but with out seconds so the value created in the database 'datetime column always has '00' for the seconds. I want to remove the seconds when I display the value on a webpage. I currently have:
<?php echo $row_rsEnquiriesList['contact_date_e']; ?>
which displays something like this - 26-12-08 12:40:00.
I would like it to display this - 26-12-08 12:40
You can do it as follow
<?php
echo date('d-m-y H:i',strtotime($row_rsEnquiriesList['contact_date_e']));
?>
It will remove seconds. and you can remove anything you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With