Understanding the Issue
When importing dates with a specification of the timezone, for example, 2022-05-15 18:42:00.000 +0200, SFMC will automatically convert it to the system time zone. This can result in dates being shifted by a certain number of hours, depending on the system time zone and the original timezone of the imported date.
Root Cause of the Problem
The root cause of this issue is that SFMC uses the system time zone to convert imported dates, and this time zone does not observe daylight saving time (DST). This means that dates imported during DST periods may be converted incorrectly.
Fixing the Issue
To avoid this issue, it is essential to understand the date format used by SFMC and to ensure that imported dates are in the correct format. The supported date formats in SFMC are listed in the Salesforce documentation.
Date Import Example
// Example of date import in SFMC // Using the correct date format can help avoid conversion issues Date ImportedDate = '2022-05-15 18:42:00.000 +0200';
Best Practices for Importing Dates
Checklist for Importing Dates
- Ensure that imported dates are in the correct format.
- Be aware of the system time zone and how it may affect date conversions.
- Use the correct timezone offset when importing dates.
- Test date imports to ensure that they are being converted correctly.
- Consider using a date import tool that can handle timezone conversions automatically.
Frequently Asked Questions
What is the default time zone used by SFMC?
The default time zone used by SFMC is the system time zone, which is set by the administrator.
How can I avoid date conversion issues when importing dates?
To avoid date conversion issues, ensure that imported dates are in the correct format and use the correct timezone offset.
Can I change the system time zone used by SFMC?
Yes, the system time zone can be changed by the administrator, but this may affect other features and functionality within SFMC.
What is the impact of DST on date conversions in SFMC?
The system time zone used by SFMC does not observe DST, which can result in date conversion issues during DST periods.
Need help shipping this in production?
Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.