Attached is workflow with a text input with multiple date formats. I need all of these to match a MM/DD/YYYY format. However I would also like to be able for the workflow to dynamically know that if its just the day and time then that means it's the current week. Example: Mon 6:37 p.m. would be 08/24/2020. However examples like Mon 08/17 would be changed to 08/17/2020. This has had my head scratching for a couple of hours and was hoping for some help.
Solved! Go to Solution.
Hi @COrr
Assuming that there is only ever 3 formats and this week is = "Mon 4:47 PM ", last week is = "Thu 8/20" then "8/13/2020" for everything previous.
Bit messy but does the trick.
Let me know how you get on.
Yes there are only the 3 formats. Is the attached workflow supposed to be a stepping stone to the one in the picture? Because it looks way different.
Sorry, wrong file. Updated will match now. 🙂
this is just darn impressive. it's going to take me a bit to understand the conditional expression on generate rows tool. Thank you so much for your help!
This is the first formula.
DateTimeAdd(DateTimeToday(),tonumber(DateTimeFormat(DateTimeToday(),"%w"))*-1,'days')
Basically this - DateTimeFormat(DateTimeToday(),"%w") gets the weekday number 0 being Sunday, 6 being Saturday. I times it by -1 to give me the inverse and add that number of days to today and you get Sundays date.
For the previous week I took another 7.
Glad it helped anyhow.