I have the following Planner Task:
I need the date in nodes under "start" to create a new Task with the due date "start date (in this case 01.04.2023) - 7 days". How can I impement this?
I have the following Planner Task:
I need the date in nodes under "start" to create a new Task with the due date "start date (in this case 01.04.2023) - 7 days". How can I impement this?
Hi @ChristopherHau,
You can use the same approach as in the previous thread. Use an indexOf to find the Start: label. Use substring to retrieve the 10 characters of your 01.04.2023 string value. You do need to use some split functions to split (on the dot) the year month and day values and turn it into the correct datetime format (yyyy-MM-ddTHH:mm:ss.fffZ) with a concat for the due date field though.
Below is an example
concat(split(if(equals(indexOf(outputs('Get_task_details')?['body/description'], 'Start: '), -1), 'No Start Time Found', substring(outputs('Get_task_details')?['body/description'], add(indexOf(outputs('Get_task_details')?['body/description'], 'Start: '), 7), 10)), '.')[2], '-', split(if(equals(indexOf(outputs('Get_task_details')?['body/description'], 'Start: '), -1), 'No Line Manager found', substring(outputs('Get_task_details')?['body/description'], add(indexOf(outputs('Get_task_details')?['body/description'], 'Start: '), 7), 10)), '.')[1], '-', split(if(equals(indexOf(outputs('Get_task_details')?['body/description'], 'Start: '), -1), 'No Line Manager found', substring(outputs('Get_task_details')?['body/description'], add(indexOf(outputs('Get_task_details')?['body/description'], 'Start: '), 7), 10)), '.')[0], 'T00:00:00.000Z')
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1