Welcome Guest, Not a member yet? Register   Sign In
MySQL DATE_FORMAT
#1

[eluser]Constantin Iliescu[/eluser]
Hello,

When I try to select formatted date using active record

Code:
$this->db->select( "date_format(created, '%d.%m.%Y') as created_date", FALSE );
$res = $this->db->get( 'ticket' );

the month gets prefixed with the table prefix I set in database configuration file (sl), like so:

Code:
[created_date] => 05.sl_07.2012

It works if the format is something like this:
Code:
'%d-%m-%Y'

Is this a bug?
Thanks in advance.


Messages In This Thread
MySQL DATE_FORMAT - by El Forum - 07-10-2012, 02:40 AM
MySQL DATE_FORMAT - by El Forum - 07-10-2012, 06:39 AM
MySQL DATE_FORMAT - by El Forum - 07-11-2012, 02:38 AM
MySQL DATE_FORMAT - by El Forum - 08-19-2012, 02:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB