Date conversion in codeigniter |
[eluser]mddd[/eluser]
Mysql is a bit flexible on how you specify the date, but the important thing is that the order must be year-month-day. If your date is already a string, you could use: Code: $mydate = '02/05/2010'; For getting the date FROM the database, use Mysql's date_format function. It works just like date() in php. But why process it in php if you can get it the right way from Mysql in the first place. See date_format in the Mysql manual . |
Messages In This Thread |
Date conversion in codeigniter - by El Forum - 06-06-2010, 08:33 PM
Date conversion in codeigniter - by El Forum - 06-07-2010, 12:29 AM
Date conversion in codeigniter - by El Forum - 06-07-2010, 02:00 AM
Date conversion in codeigniter - by El Forum - 06-07-2010, 05:37 AM
Date conversion in codeigniter - by El Forum - 06-07-2010, 05:45 AM
Date conversion in codeigniter - by El Forum - 06-07-2010, 06:20 AM
Date conversion in codeigniter - by El Forum - 06-07-2010, 06:27 AM
Date conversion in codeigniter - by El Forum - 06-07-2010, 06:36 AM
Date conversion in codeigniter - by El Forum - 06-07-2010, 06:42 AM
Date conversion in codeigniter - by El Forum - 06-07-2010, 08:43 AM
Date conversion in codeigniter - by El Forum - 06-07-2010, 09:44 AM
|