Search code examples
power-automate

How can I format time output in Power Automate


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.


Solution

  • https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#formatDateTime

    Assuming you have a variable called DateTime, you would create another variable and use this expression ...

    formatDateTime(Variables('DateTime'), 'yyyy/MM/dd')
    

    Result

    Result