1

I've object with date field, and excel file with data to import. one of the fields found on excel is delivery date 1/10/2015 17:28 (day/month/year time). Now when I import to target object it's imported as 10/01/2015 (day/month/year)

what is the best way to handle this issue before save the record. because saving record means invalid date value

2
  • How are you importing the file?
    – sfdcfox
    Commented Oct 7, 2015 at 17:23
  • I use dataloader @sfdcfox Commented Oct 7, 2015 at 17:25

1 Answer 1

1

The data loader requires that the fields are formatted correctly, as outlined here. Here's the list:

yyyy-MM-ddTHH:mm:ss.SSS+/-HH:mm
yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
yyyy-MM-dd'T'HH:mm:ss.SSS Pacific Standard Time
yyyy-MM-dd'T'HH:mm:ss.SSSPacific Standard Time
yyyy-MM-dd'T'HH:mm:ss.SSS PST
yyyy-MM-dd'T'HH:mm:ss.SSSPST
yyyy-MM-dd'T'HH:mm:ss.SSS GMT-08:00
yyyy-MM-dd'T'HH:mm:ss.SSSGMT-08:00
yyyy-MM-dd'T'HH:mm:ss.SSS -800
yyyy-MM-dd'T'HH:mm:ss.SSS-800
yyyy-MM-dd'T'HH:mm:ss
yyyy-MM-dd HH:mm:ss
yyyyMMdd'T'HH:mm:ss
yyyy-MM-dd
MM/dd/yyyy HH:mm:ss
MM/dd/yyyy
yyyyMMdd

You can format the column in Excel before using Ctrl-1 (Format Cells), then choosing the appropriate date format (YYYY-MM-DD); when you save the CSV file, they will retain the correct formatting.

If you're seeing the dates "backwards", check your "locale" under "Your Name" > My Settings > Language & Time Zone (new User Interface), or under Setup > My Personal Information > Personal Information (classic User Interface, or with Sites). If you're using a locale like UK, the date will be DD-MM-YYYY, while if you use the US locale (and some others), it will be MM-DD-YYYY. I suspect your account was simply set up with the wrong locale.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .