Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Recurring delivery - Query help

CarinaL
Level 2
Level 2

Hi,

I need to set up a recurring delivery for a customer communications notice.

The notice needs to go out 30 days before their renewal date.

Is the correct expression "SubDays(@renewalDate,30)" equal to DateOnly(GetDate())?

The written form of this is - 

Query: Renewal date - 30 day equal to dateOnly(current date)

1 Reply
eveline8
Level 4
Level 4

Hi,

i suggest you to use the function ToDate() that converts a date + time as a date.

So I think that the correct expression becomes ToDate(SubDays(@renewalDate,30)) equal to ToDate(GetDate()).

In this way, remove the time from both fields (in case it is present).

Eveline

CarinaL
Level 2
Level 2

I also realised that this notification will need to send on weekdays only.

Where the email date does not fall on a weekday, I will need the email to send earlier (on Friday).

What is the solution around this?

davidl14970702
Level 5
Level 5

Should be able to use a scheduler to define those options. Set it to delivery daily then it will allow you to pick which days of the week you want.