My SQL Query results pulls in a date. I need to take this date, add 365 days to it, and compare that date to utcNow. I do not know how to format the date to look like utcNow in order to compare
Solved! Go to Solution.
@Anonymous
Hi there! You can do all this with an expression, but I don't know how, so here's my version : Look for this action "Add to Time" to add the 365 days to the date.
From there, you can use the Convert Time Zone function to format the date however you'd like (the from and to timezones can both be UTCz).
Keep us posted.
-Ed-
If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.
@Anonymous
Hi there! You can do all this with an expression, but I don't know how, so here's my version : Look for this action "Add to Time" to add the 365 days to the date.
From there, you can use the Convert Time Zone function to format the date however you'd like (the from and to timezones can both be UTCz).
Keep us posted.
-Ed-
If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.
I'm new to Flow and I did not know Add to time was an option so thanks for that @edgonzales . The problem that I am getting is with the date itself. My problem is I do not know how to take the sql output and convert it to just the date and making that date 8601 format
Ah, ok. So, if you do the Convert Time zone first, then you can format it before the add time step. OR, you can use this expression in the add-time step (the stuff in red you would replace with the dynamic output from your SQL (let me know if you need help there)):
Hi @Anonymous
Please see the screenshot below:
Here, I have directly put the original date in the variable as a hardcoded value, you can reference it to the output from the previous actions.
Expression used to format the date and add days:
addDays(formatDateTime(variables('ss'),'yyyy-MM-ddThh:mm:ss'),365)
And then compare with utcnow()
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
30 | |
29 | |
29 | |
21 | |
11 |