You are hereTech: SugarCRM importing dates problem

Tech: SugarCRM importing dates problem


By steve - Posted on 14 August 2009

I was writing an module for SugarCRM so that users could regularly import data from another system. I kept getting dates that would only import as 2000-01-01 (01/01/2000).

The data was being read in correctly according to the logs and seemed to be processed as UTF-8 just fine, but the dates kept coming in defaulting to the standard "I don't know what this date is" SugarCRM result of 01-01-2000...

The solution was a little annoying, but simple enough.

You need to set the incoming data to be the EXACT date format that the user has in "My Account". If you have a format like 09-14-2009 in "My Account", your incoming CSV (or whatever) data file must have that exact same format. If you have 2009/09/14, then the data must look like that in your file.

SugarCRM doesn't warn about the problem, it just defaults the date to 2000-01-01.

Also, your data format for imports in "My Accounts" may need to be set to UTF-8, instead of CP1252 or whatever you might have. Or you may need to set it to whatever the file you are importing is in.

My problem was that the export report format that created the Excel file that I converted to CSV was in 09/14/2009 format and my SugarCRM date format was 09-14-2009.

Tags

Did this help you? You can help me!


Did you find this information helpful? You can help me back by linking to this page, purchasing from my sponsors, or posting a comment!


+One me on Google:


Follow me on twitter: http://twitter.com/mojocode







Comments



Affiliation Badges