I want to show the datetime in the following format
2015-01-05T06:27:50.000Z
How I can achieve this ?
Try this:
<?php echo date("Y-m-d\TH:i:s.000\Z", strtotime("2015-01-05 06:27:50")); ?>
If you want to include the right timezone offet:
date('Y-m-d\TH:i:s\.Z\Z');
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