1

I've got a journey that uses data entry from Salesforce, specifically when a lead registers for an event an Event Registrant object is created. I am pulling in the Event_Date_Time__c and RegistrationDateTime__c fields to the DE. Somehow, the data put in the DE ends up being 4 hours later than the data in Salesforce. e.g.:

idk!

I can obviously just subtract 4 from the field within my email templates but that's going to be a nightmare to maintain. It just looks like the times are being converted to GMT. There's got to be a setting I've missed somewhere!

Edit: Testing for any weird stuff going on, this function correctly returns the current time in EDT as expected.

%%[
VAR @currentSystemTime 
SET @currentSystemTime = NOW() 
]
%%Local Time For User: %%=SystemDateToLocalDate(@currentSystemTime)=%% 
2

Marketing Cloud processes dates to CST.

You can use the SystemDateToLocalDate Function to deal with this (assuming Salesforce is your local time).

eg,

Assuming these are captured in a field called Date,

%%=SystemDateToLocateDate(Date)=%%
  • Is it possible to apply this function at the DE level or will I need to set this up in each of my many templates? I'm also considering the fact that I have time-based wait steps that are based on these fields. – JaredT Jun 5 '18 at 14:17
  • To do that, you would have to create another column in a de and use the OFFSET t-sql function calculate this. – Samuel Dare Jun 5 '18 at 14:24
  • So I've added the function to my template: %%=FormatDate(SystemDatetoLocalDate(Object__c:Event_Date_Time__c), "", "s", "")=%%. It's progress, but the time displayed is still two hours later than the date/time field dictates! – JaredT Jun 5 '18 at 14:45
  • Is the time in your setting above correct i.e does it match the time on your wristwatch? – Samuel Dare Jun 5 '18 at 15:10
0

So it seems that there is no official means of coercing data feeding into the extension using the local time zone. The solution I have come upon, that works, is as I feared and must be handled in each email template.

%%[ 
    var @correctedDate 
    set @correctedDate = DateAdd(Object__c:DateTime_Field__c,-4,"H") 
    set @formattedDate = FormatDate(@correctedDate, "l","","en-US") 
    set @formattedTime = FormatDate(@correctedDate, "","s","") 
]%%


%%=v(@formattedDate)=%%
%%=v(@formattedTime)=%%

Editing to add feedback from SFMC support:

...it seems like manually adapting that will be your best be, sorry it doesn't work as you expected! As well as the Integration works, somethings just don't translate between the 2 platforms.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.