Search Results

Search found 1 results on 1 pages for 'faisalkhan'.

Page 1/1 | 1 

  • Yii: Saving date and time in DB

    - by FaisalKhan
    I am having trouble saving the date in DB through Model. In my controller, if I dump the date in log that I receive from $_POST , I get the date in this format "10/Nov/2012 07:30". If I use: $AccountAppointment->start_date=Yii::app()->dateFormatter->format($_POST['AccountAppointment']['start_date'], 'dd/M/yyyy HH:mm'); I get the error: Invalid datetime format: 1292 Incorrect datetime value: '10/NoGMT+5/2012 07:30' for column 'start_date' Changing the format in dateFormatter to 'dd/M/yyyy HH:mm' or 'dd/MM/yyyy HH:mm' or 'dd/MMM/yyyy HH:mm' throws the same error. Db is MySQL 5.0, Yii version 1.1.12. Any help would be greatly appreciated, I am almost stuck....thanks....

    Read the article

1