Hi I'm trying to convert my result out of a timestamp field into a formated way.
So from '2016-12-24 14:11:00' to '2016-12-24T14:11:00Z'
What is the easiest way to do so?
Hi I'm trying to convert my result out of a timestamp field into a formated way.
So from '2016-12-24 14:11:00' to '2016-12-24T14:11:00Z'
What is the easiest way to do so?
It looks like ISO 8601
format which can be achived by date with c
param.
echo date('c', strtotime('2016-12-24 14:11:00'));
but if u want exactly that format you could personalize it
echo date('Y-m-d\TH:i:s\Z', strtotime('2016-12-24 14:11:00'));
If z
letter means something then probably you need to find proper parameter on http://php.net/manual/en/function.date.php