Reputation: 37
In my power automate flow, I have an action that give time output in this format: 2022-12-01T18:52:50.0000000Z How can I take this output and format as yyyy/mm/dd . I want to use the time output as string for a folder structure.
Upvotes: 0
Views: 991
Reputation: 11217
Assuming you have a variable called DateTime
, you would create another variable and use this expression ...
formatDateTime(Variables('DateTime'), 'yyyy/MM/dd')
Result
Upvotes: 2
Reputation: 2447
This is pretty straight forward.
Use the Convert datetime to text function
In the Format to use dropdown select Custom
and specify the format how you would like it to appear.
yyyy/MM/hh will give you 2022/12/01
HH-mm-ss will give you 18-52-50
Upvotes: 1