Hello all, I'm facing a weird issue as follows:
In the database and after querying a list I have a column that contains a specific date in a regular format
I'm manipulating the data with this JS code:
var lastDate = formatDate(targetData.LastFillDate,"%2M/%2D/%2Y");
So, after sending proofs I can see the date was modified showing one day less, like:
So, have you faced this issue, and do you know how to resolve it? Thank you.
Note: If I don't modify the data with JS, I get something like this (see the format):
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
storing and presenting date(time) fields can be tricky. I had the exact same issue and it turned out the Campaign server was set up to use a different timezone than UTC. That means the date/time values are stored in UTC.
They way they are presented can be completely different, eg. when your Campaign operator is set to use a different timezone (see operator details).
I recommend reading this page: https://experienceleague.adobe.com/docs/campaign-classic/using/installing-campaign-classic/install-c...
As mentioned by others I would also recommend using the timezone parameter on the formatDate function to force a specific timezone.
Best regards, Tobias
Hi @israel_sanchez ,
Try adding RX1_LastFillDate in an enrichment activity and apply ToDate function
and then use formatDate function in your HTML on that date field.
Hope this helps.
Thanks.
Views
Replies
Total Likes
Hello, thank you for the insight, it didn't work, we are searching for another option.
Views
Replies
Total Likes
Hello @israel_sanchez
Try adding a timezone parameter in the formatDate function or change the timezone in the workflow properties.
Hi,
storing and presenting date(time) fields can be tricky. I had the exact same issue and it turned out the Campaign server was set up to use a different timezone than UTC. That means the date/time values are stored in UTC.
They way they are presented can be completely different, eg. when your Campaign operator is set to use a different timezone (see operator details).
I recommend reading this page: https://experienceleague.adobe.com/docs/campaign-classic/using/installing-campaign-classic/install-c...
As mentioned by others I would also recommend using the timezone parameter on the formatDate function to force a specific timezone.
Best regards, Tobias