I have a field (Due Date) that is a date field, I want to send an email if the due date is in 3 days time, to remind people to do training on time.
I have this formula addDays(formatDateTime(triggerOutputs()?['body/duedate'],'yyyy-MM-dd'), -3) but it seems to always return Due Date = 2022-05-12T00:00:00.0000000 Why is it not removing the time from the end? The due date field is a Sharepoint list, does this have something to do with it?
Solved! Go to Solution.
Hi @Craigja,
Have you resolved your problem?
Could you please share your flow with me?
Actually, if there is DueDate column existing in your list, you should loop through the list to check each due date.
formatDateTime(items('Apply_to_each')?['DueDate'],'yyyy-MM-dd')
addDays(utcNow(),-3,'yyyy-MM-dd')
Yeah I eventually got it working by messing about with the formatting of the date, not sure what I was doing wrong
Try the following format for addDays function:
addDays('<timestamp>', <days>, '<format>')
example:
addDays('2022-05-12T10:10:10', -3,'yyyy-MM-dd') --> 2022-05-09
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hi @Craigja,
Have you resolved your problem?
Could you please share your flow with me?
Actually, if there is DueDate column existing in your list, you should loop through the list to check each due date.
formatDateTime(items('Apply_to_each')?['DueDate'],'yyyy-MM-dd')
addDays(utcNow(),-3,'yyyy-MM-dd')
Yeah I eventually got it working by messing about with the formatting of the date, not sure what I was doing wrong
User | Count |
---|---|
93 | |
44 | |
21 | |
17 | |
16 |
User | Count |
---|---|
137 | |
50 | |
42 | |
39 | |
29 |