Hi,
I need to create/update some leads with date values that are stored in custom fields.
Here is how I try to do it :
But id doesn't work. I get this :PHP Code:<?php
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/entryPoint.php');
require_once 'modules/Leads/Lead.php';
$lead=new Lead();
$lead->birth_date_c=date('Y-m-d H:i:s', strtotime('12/31/1976'));
echo 'before :'.$lead->birth_date_c."<br>\n";
$lead->save();
echo 'after :'.$lead->birth_date_c;
?>
and in SugarCRM, the lead is created with 2000-01-01 in the birth_date_c field.Code:before :1976-12-31 00:00:00 after :
Can someone tell me what's wrong with this code ?
thanks !


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks