Salesforce Data Loader Date Format: All You Need to Know
When importing data into Salesforce using Data Loader, ensuring the correct date format is crucial to avoid errors. Salesforce supports specific date and datetime formats, and incorrect formatting or missing time components can cause import failures or unexpected shifts in values. This guide covers accepted formats, timezone handling, CSV preparation tips, and real-world examples.
Supported Date Formats in Salesforce Data Loader
Salesforce Data Loader accepts various date and datetime formats, but improper formatting can lead to issues. Date fields and DateTime fields are handled differently, and understanding how system settings influence interpretation is essential.
Date Format
Salesforce accepts the following date formats:
- YYYY-MM-DD — Recommended universal format (ISO 8601)
- MM/DD/YYYY — Default in most U.S. systems
- DD/MM/YYYY — Works only when “Use European Date Format” is enabled in Data Loader settings
DateTime Format
For DateTime fields, the following formats are supported:
- YYYY-MM-DD hh:mm:ss— valid, but doesn’t include timezone info and may be interpreted based on your system settings. Using the full ISO format (e.g. YYYY-MM-DDThh:mm:ss.SSSZ) is safer and more consistent.
- YYYY-MM-DDThh:mm:ss.SSSZ — Recommended full format (ISO 8601)
- 24-hour (military) time format is accepted –e.g., 18:45:00 means 6:45 PM. This avoids AM/PM confusion.
Warning: Ambiguous formats like 01/03/2024 can mean January 3 (U.S.) or March 1 (Europe), depending on region settings. To avoid confusion, always use ISO 8601.
For more details on date formatting, check the official Salesforce documentation.
How to Format Dates Correctly in Excel or CSV
Excel Formatting Issues
Excel can automatically reformat dates, causing problems when saving CSV files. To prevent this:
- Set a custom format: Use Format Cells > Custom and define YYYY-MM-DD or YYYY-MM-DDThh:mm:ss.SSSZ.
- Use “Text” format: Before entering dates, format columns as “Text” to prevent unwanted autoformatting.
- If a date (01-03-2024) is imported without a time component from a GMT+8 system, Salesforce converts it to 29-02-2024T16:00:00Z.
- If a date (01-03-2024) is imported without a time component from a GMT+8 system, Salesforce converts it to 29-02-2024T16:00:00Z.
-
- If a date (01-03-2024) is imported without a time component from a GMT+8 system, Salesforce converts it to 29-02-2024T16:00:00Z.Verify the saved CSV: Open the CSV in a plain text editor like Notepad++ (Windows) or BBEdit (Mac) to ensure dates are correctly formatted.Example: A date that looks correct in Excel may be saved incorrectly in CSV format, leading to import errors. For instance, if you enter 2024-03-15 in Excel, it might display correctly, but when saved as a CSV, Excel could convert it to 03/15/2024 (MM/DD/YYYY) or 15/03/2024 (DD/MM/YYYY), depending on regional settings. This discrepancy can cause Salesforce to misinterpret the date or reject the import entirely. Opening the CSV in Notepad++ or BBEdit before uploading allows you to verify that the date remains in the intended format. You can read more about importing Salesforce dates here.
Understanding Time Zone Shifts and Date Rollback
Salesforce interprets DateTime values using GMT, and missing time components can cause unintended shifts.
How It Works:
- If a date (01-03-2024) is imported without a time component from a GMT+8 system, Salesforce converts it to 29-02-2024T16:00:00Z.
CSVSalesforce
- This is not a bug but a result of timezone logic.
- The system clock and local timezone settings influence how Salesforce processes dates.
Why This Happens
Salesforce stores all DateTime values in Coordinated Universal Time (UTC/GMT). When a date without a time is imported, Salesforce assumes midnight (00:00:00) in the system’s local timezone. This can lead to a rollback effect when converted to GMT.
For example:
- A user in GMT+8 enters March 1, 2024 (without a time component).
- The system assumes 03-01-2024 00:00:00 GMT+8.
- Salesforce converts this to 02-29-2024 16:00:00Z in GMT.
- The date appears one day earlier than expected when viewed in Salesforce.
Solution:
- Always include a time component (T08:00:00Z) for precise DateTime imports.
- Check your system timezone settings before importing data.
- Use a consistent format like YYYY-MM-DDThh:mm:ss.SSSZ to avoid conversion issues.
For more information about timezone shifts, you can refer to this Salesforce documentation.
Preparing Your File for a Smooth Import
Follow these key steps to avoid formatting errors in your CSV:
-
- Remove empty rows: Blank rows can cause errors in Data Loader.
- Avoid duplicate headers: Ensure each column has a unique, meaningful header.
- Ensure required fields are filled: Missing values in mandatory fields can cause import failures.
- Check for typos in column names: Incorrect field names may prevent correct mapping to Salesforce fields.
- Use UTF-8 encoding if special characters are used: This prevents issues with special characters, especially in non-English data.
- Validate CSV in a plain text editor before uploading: Open the file in Notepad++ (Windows) or BBEdit (Mac) to confirm formatting.
Common Date Format Issues and How to Spot Them
Problem Likely Cause Quick Fix Date appears 1 day earlier Time zone default Add time manually (T08:00:00Z) Field is blank/null Excel stripped formatting Format as text + validate CSV Wrong date due to 01/03/2024 flip Region mismatch in Excel Use YYYY-MM-DD, validate raw CSV CLI import fails with EU dates useEuropeanDates not set in XML Add flag in CLI config Using Third-Party Tools for Date Formatting
While Salesforce Data Loader requires careful date formatting, XL-Connector can provide a more seamless experience for handling dates directly within Excel. XL-Connector eliminates many of the common issues with date formatting by preserving Excel’s native date formatting and preventing unwanted autoformat changes when exporting CSV files.
However, you should always verify that your Salesforce locale and time zone settings and Windows ones match. Additionally, XL-Connector allows direct validation and upload to Salesforce without needing to open or modify raw CSV files in a text editor. This reduces the risk of misformatted dates, time zone shifts, and import errors, making it a more user-friendly option for Excel-based workflows.
Key Takeaways
- Test a few records before large imports to confirm correct date handling.
- Always use ISO 8601 or a clearly defined format.
- Add time components when working with DateTime fields.
- Don’t rely on Excel alone—always validate CSV files manually.
- Check your system’s time zone, as Salesforce interprets dates based on GMT.
- Use a plain text editor to verify CSV formatting before import.
By following these best practices, you can avoid common import errors and ensure accurate data migration in Salesforce Data Loader.
- If a date (01-03-2024) is imported without a time component from a GMT+8 system, Salesforce converts it to 29-02-2024T16:00:00Z.Verify the saved CSV: Open the CSV in a plain text editor like Notepad++ (Windows) or BBEdit (Mac) to ensure dates are correctly formatted.Example: A date that looks correct in Excel may be saved incorrectly in CSV format, leading to import errors. For instance, if you enter 2024-03-15 in Excel, it might display correctly, but when saved as a CSV, Excel could convert it to 03/15/2024 (MM/DD/YYYY) or 15/03/2024 (DD/MM/YYYY), depending on regional settings. This discrepancy can cause Salesforce to misinterpret the date or reject the import entirely. Opening the CSV in Notepad++ or BBEdit before uploading allows you to verify that the date remains in the intended format. You can read more about importing Salesforce dates here.
Xappex CRM data management solutions
Looker Studio for Salesforce
Connect Salesforce reports and queries to your Google Data Studio dashboards.
Excel Merge
Calculate advanced Excel models. Generate Excel documents based on Salesforce data. All with a single click from a Salesforce record page.