Welcome Guest, Not a member yet? Register   Sign In
Setting Oracle date field
#8

[eluser]fszostak[/eluser]
For example, I have a Oracle table with a field type DATE...

Then this table is mapped in a model like this code below.

Mymodel code:
Code:
class My_model extends Model {
    public $MYDATE;

    private function insert() {
        $this->db->insert("MY_TABLE", $this);
    }
}

Mycontroller code:

Code:
$mymodel = new My_model()
$mymodel->MYDATE = '06/08/2010 17:23:45';
$mymodel->insert();

I receive this error: ORA-01830: date format picture ends before converting entire input string.

If you set only date works okay. $mymodel->MYDATE = '06/08/2010';

In Oracle i need put TO_DATE function, but it is dont work in Active Record CI.... i have a lot of codes to make changes, because it is a migration from MySQL.

Thanks for attention.


Messages In This Thread
Setting Oracle date field - by El Forum - 02-20-2009, 01:20 PM
Setting Oracle date field - by El Forum - 02-21-2009, 04:36 AM
Setting Oracle date field - by El Forum - 02-23-2009, 10:40 AM
Setting Oracle date field - by El Forum - 04-28-2009, 07:27 PM
Setting Oracle date field - by El Forum - 12-15-2009, 11:06 AM
Setting Oracle date field - by El Forum - 08-06-2010, 01:26 PM
Setting Oracle date field - by El Forum - 08-06-2010, 02:06 PM
Setting Oracle date field - by El Forum - 08-06-2010, 02:34 PM
Setting Oracle date field - by El Forum - 08-06-2010, 03:41 PM
Setting Oracle date field - by El Forum - 08-06-2010, 07:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB