Qazi Qazi - 1 year ago 94
PHP Question

PHP: How to display date time in following format (2015-01-05T06:27:50.000Z )?

I want to show the datetime in the following format


How I can achieve this ?

Answer Source

Try this:

<?php echo date("Y-m-d\TH:i:s.000\Z", strtotime("2015-01-05 06:27:50")); ?> 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download