Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Start Date and End Date in automatic task creation based the month.

Rekhadevi Velur September 13, 2021

I am creating a set of monthly tasks in automation rules and each task has different start and end dates.

for example task 1 - start date first Monday  End date after 2 weeks i.e. second Friday.

task 2- start date second Monday  and End date after 2 weeks

right now I am using the smart values to set these dates, like

startdate = {{now.plusMonths(1).ofTheMonth(1, 1)}} 

enddate = {{now.plusMonths(1).ofTheMonth(2, 5)}}

This way only works if the month is starting on a Sunday or Monday. How to calculate it if the month is not starting on any other day? or is there a way in smart values to get dates based on the current year and month?

1 answer

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
September 13, 2021

Hi @Rekhadevi Velur I'm not sure I understand it correctly...you need to have startdate and enddate always in next month? Can you describe it in more detail pls?

Rekhadevi Velur September 13, 2021

Yes. I am creating tasks for next month and setting their start and end dates.

Martin Bayer _MoroSystems_ s_r_o__
Community Champion
September 13, 2021

Hm, your smart values look correct to me. What value is set if the beginning of the month is not Sunday or Monday?

Like Rekhadevi Velur likes this

Suggest an answer

Log in or Sign up to answer