Why can I not parse a string to a date?
I use this function:
<?= CDateTimeParser::parse('2009-11-11 21:18:09','dd/MM/yyyy'); ?>
Why can I not parse a string to a date?
I use this function:
<?= CDateTimeParser::parse('2009-11-11 21:18:09','dd/MM/yyyy'); ?>
try
CDateTimeParser::parse('2009-11-11 21:18:09','yyyy-MM-dd hh:mm:ss');
Oh, the last string is the format for the input value, not for the output format?
http://www.yiiframework.com/doc/api/CDateTimeParser
"CDateTimeParser converts a date/time string to a UNIX timestamp according to the specified pattern."
"To format a timestamp to a date string, please use CDateFormatter."