Hello,
I've tried just about everything on my workflow to filter this row of data.
Data input is a string written as "yyyy-mm"
I'm trying to convert it into a date so that I can filter for current month - 1
Example return value should be "2022-06" since that it this month - 1
tried datetime tool and converting the string to date format in select tool, not working too well for me.
Thanks!
Solved! Go to Solution.
Try DateTimeParse([DateColumn], "%y-%m") = DateTimeAdd(DateTimeToday(), -1, "months") in a filter where you swap out DateColumn with your date column
The DateTimeParse function will turn that into a date so if you want an intermediate step you can use DateTimeParse([DateColumn], "%y-%m") and it should turn those strings into dates. I would recommend creating a new column rather than modifying the existing.
Ah sorry quick adjustment, I wasn't accounting for the fact that today is the 18th and I needed to set it to the first of the month. Try this in your filter instead:
DateTimeParse([Funding Year], "%Y-%m") = DateTimeFormat(DateTimeAdd(DateTimeToday(), -1, "months"), "%Y-%m-01")
Yes perfect!!!!
Thank you so much!