Hola de nuevo!...
acabo de probar lo que me comentas... pero me sale error al usarlo..
He probado dos formas:
1- $new_sdate = $ts_sdate;
$new_edate = $ts_edate;
echo date('Y-m-d H:i:s',$new_sdate);
echo date('Y-m-d H:i:s',$new_edate);
y la segunda:
$new_sdate = date('Y-m-d H:i:s',$ts_sdate);
$new_edate = date('Y-m-d H:i:s',$ts_edate);
y despues hago la consulta....
Cita:
$query = "INSERT INTO #__jcalpro2_events(extid,cal_id,owner_id,title,des cription,cat,approved,private,start_date,end_date, recur_until,rec_monthly_day_list,rec_yearly_on_mon th_list,published)"
. "\n VALUES ($id,'1',$user->id,$title,$content,$project,'1','1',$new_sdate,$n ew_edate,$new_edate,'0','0','1')";
$this->_db->setQuery($query);
$this->_db->query();
Este es el error que me sale...
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,'0','0','1')' at line 2 SQL=INSERT INTO jos_jcalpro2_events(extid,cal_id,owner_id,title,de scription,cat,approved,private,start_date,end_date ,recur_until,rec_monthly_day_list,rec_yearly_on_mo nth_list,published) VALUES (34,'1',66,'Evento2','','11','1','1',,,,'0','0','1 ')
Si te fijas bien en el error sql, se refiere a los campos de las fechas....
que puede ser?
Te agradezco mucho tu tiempo