cancel
Showing results for 
Search instead for 
Did you mean: 

Date in Salesforce acceptable format

darshthakkar
Valued Contributor

Hi Team,

I have 2 fields, Start and End Date coming from upstream systems (i.e. snowflake) in UTC and want this to be inserted to downstream systems (i.e. Salesforce) in UTC as well. After developing the pipeline, we found that the dates are off by 4 hours when it goes into Salesforce.

Thus, I tried changing the date to EST format in order to resolve the issue however at Salesforce, the dates are further going off by 4 hours.

Should I just add 4 hours in my mapper which formats date so that it goes as is in Salesforce? If that’s the case, how should I add those 4 hours? It seems like the Salesforce Org is GTM-4 therefore it always converts the time - 4hours.

Some screenshots for convenience.

  1. Snowflake execute with the below settings:
    image

  2. EST Add-on:
    image

With the EST add on, the dates on Salesforce is going as 2025-12-29T15:00:00Z which is 29 Dec 2025 3pm.

  1. Removed EST Add-on:
    image

While removing the EST add-on, dates on Salesforce is still going as (Date - 4 hours) i.e. 29 Dec 2025 8pm.

How can I tackle this?

Thanking in advance for your time.

Regards,
Darsh

1 ACCEPTED SOLUTION

darshthakkar
Valued Contributor

Based on how the Org has been setup in downstream systems, transformations must be made in snapLogic. For me, Salesforce Org is GMT-4 thus, I adjusted the date accordingly using

$Expire_Date.plusHours(4).toLocaleDateTimeString({format: "yyyy-MM-dd'T'HH:mm:ss'Z'"})

Moreover, it is vital to check the data type at the downstream systems as well. We may be ingesting wrong data and thus the dates might be off and not consistent. For example, I’m ingesting Date/Time but Salesforce Org is only Date then it wouldn’t make sense.

Consequently, another function can also be used which is as below:

$Expire_Date.toLocaleDateTimeString({format: "yyyy-MM-dd'T'HH:mm:ss'Z'","timeZone":"GMT"})

$Expire_Date.toLocaleDateTimeString({format: "yyyy-MM-dd'T'HH:mm:ss'Z'","timeZone":"GMT+4"})

Closing this thread now as the issue has been found at the downstream systems and not with snapLogic plus it has been resolved too.
Thank you everyone for your time, help and inputs on this one.

View solution in original post

7 REPLIES 7

Hi Darsh, have you tried sending the format instead of timezone send the offset

image

Yes @alchemiz, I have tried with all the tweaks, your suggestion of timezone: UTC is something I used at the very first instance; you can check the screenshots when this question was raised.

I believe there’s nothing wrong on snapLogic side but the downstream system accepting the data from the middleware. Anyways, thank you for thinking through this.

darshthakkar
Valued Contributor

Based on how the Org has been setup in downstream systems, transformations must be made in snapLogic. For me, Salesforce Org is GMT-4 thus, I adjusted the date accordingly using

$Expire_Date.plusHours(4).toLocaleDateTimeString({format: "yyyy-MM-dd'T'HH:mm:ss'Z'"})

Moreover, it is vital to check the data type at the downstream systems as well. We may be ingesting wrong data and thus the dates might be off and not consistent. For example, I’m ingesting Date/Time but Salesforce Org is only Date then it wouldn’t make sense.

Consequently, another function can also be used which is as below:

$Expire_Date.toLocaleDateTimeString({format: "yyyy-MM-dd'T'HH:mm:ss'Z'","timeZone":"GMT"})

$Expire_Date.toLocaleDateTimeString({format: "yyyy-MM-dd'T'HH:mm:ss'Z'","timeZone":"GMT+4"})

Closing this thread now as the issue has been found at the downstream systems and not with snapLogic plus it has been resolved too.
Thank you everyone for your time, help and inputs on this one.