Robert Granlund
asked on
Variable into datetime Format
How do I write this in PHP:
$date = "date_format(date_time'%a %c/%e')";
ASKER
How do you "date_format" a variable that is a date?
The PHP date() function can format for just about any valid date. However, what you posted above is not coming from PHP. Where are you getting it? What format is it in? This is clearly not just a PHP question because PHP doesn't have all those functions. And 'date' formats are not universal, many programs format them differently.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for that. It made something I'm doing much easier
Thanks for the points. Hope the article is helpful to you! ~Ray
Also, I recommend that you do not use PHP reserved words like 'date' as variable names. Can cause problems.