I have a problem with the dates … I downloaded the extension Yii calendar … but when I save in the db by mistake …
I have to save the date 01-Jul-03, for example, but rather save as 6 - July-2010 …
how can I change the format?
I have a problem with the dates … I downloaded the extension Yii calendar … but when I save in the db by mistake …
I have to save the date 01-Jul-03, for example, but rather save as 6 - July-2010 …
how can I change the format?
if(!empty($_POST['model']['datefield']))
$_POST['model']['datefield'] = date('j-F-Y', strtotime($_POST['model']['datefield']));
That’s one way I’ve been dealing with this situation. I use something like this in the create and update actions. I’d be curious to see a different way to solve this, but this at least works.