I'm trying to take timestamps in this format:
2009-11-16T14:05:22-08:00
and make turn them into something like
2009-11-16
How do I remove everything after the "T"?
I'm trying to take timestamps in this format:
2009-11-16T14:05:22-08:00
and make turn them into something like
2009-11-16
How do I remove everything after the "T"?
Assuming they're all in that format, the easiest way is:
$result = substr($timestamp,0,10);
Where timestamp is your starting timestamp and result is your modified timestamp.
Maybe this works:
date('Y-m-d', strtotime('2009-11-16T14:05:22-08:00'));