We are using the Now() function in a journey email. This gets converted into a Local Date and also formatted into a readable string. The variables are then passed to a data extension via the InsertDE() function. However, the time outputs in the data extension are showing up to a 10 min difference. The following code snippet appears first in the email body:
Set @LocalDateTime = Now() Set @Send_Date_SFMC = SystemDateToLocalDate(@LocalDateTime) Set @Send_Date_Time = FormatDate(@LocalDateTime, "yyyy/MM/dd HH:mm:ss")
Then there are condition statements containing the InsertDE() function. There are a lot of records being processed and the code below only shows a small portion of the inserted fields:
InsertDE("DE1", "SubscriberID",@SubscriberID, "Send_Date_Time",@Send_Date_Time, "Send_Date_SFMC",@Send_Date_SFMC)
So my question is: Does the OMM fix the Now() function for the @Send_Date_Time as a formatted constant, but only translates the value of the @Send_Date_SFMC variable later (because it is essentially retrieving the Now() system time value during the insert process which occurs last)? Putting it another way, does the InsertDE() function process this code at send time
@Send_Date_SFMC = SystemDateToLocalDate(Now())
or is the date/time cached when the @LocalDateTime variable is first set?
Failing that theory, perhaps someone may be able to shed light on what else might be causing the lag.