Hi there,
May I ask how can I write an expression to check a condition in my email - to check if product > field date value = today? I tried the below and didn't seem to work. My product date field format is "2024-12-19".
{%#if productDate = currentTimeInMillis() %}
Thanks,
Amanda
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
You can validate it on the following lines
{%let a = now %}
{%let b = toDateTimeOnly("2024-12-19T09:57:27.980Z") %}
{%let c = dateDiff(b,a) %}
{%#if c =0 %} // If the difference is zero, product field date is today
render_1
{%else%}
default_render
{%/if%}
May need to try something like this {%#if toDateTimeOnly(currentTimeInMillis()) == toDateTimeOnly(productDate) %}
You can validate it on the following lines
{%let a = now %}
{%let b = toDateTimeOnly("2024-12-19T09:57:27.980Z") %}
{%let c = dateDiff(b,a) %}
{%#if c =0 %} // If the difference is zero, product field date is today
render_1
{%else%}
default_render
{%/if%}
Hey @Mohan_Dugganab, do you know how i can convert the now (which is in UTC time) to local Sydney time (noting Australia has a few time zones based on states so this got to be Sydney). Thanks!
Views
Replies
Total Likes
Views
Likes
Replies