You need to sign in to do that
Don't have an account?
ssuede7
Format datetime for display in PHP
Hi,
This must be really simple because I can't find any example of how to do this. All I want to do is make my datetimes look nice. Here is what I get out of my query results object:
2009-09-04T06:43:36.000Z
And I would like to format it like this:
09/04/2009, 12:43 PM
Can anyone clue me in?
You can use strtotime to convert to Unix time and then date to format it, or use a regular expression to parse the SF datetime.
http://us.php.net/manual/en/function.strtotime.php
http://us.php.net/manual/en/function.date.php
All Answers
You can use strtotime to convert to Unix time and then date to format it, or use a regular expression to parse the SF datetime.
http://us.php.net/manual/en/function.strtotime.php
http://us.php.net/manual/en/function.date.php
Thanks ptepper! That was all I needed!