Forum Discussion

BryceKauffman's avatar
BryceKauffman
Copper Contributor
Jul 11, 2019

UTC Date Time in New Folder Name

I'm very new to Flow and I'm failing to get the UTC date time in a new filename.

My flow works as follow, if an email arrives with an attachment, then save this attachment in a SharePoint online Folder. So far so good everything works. However now for the difficult part I want to create a new file name. Like MM/DD/YYY
_something.pdf


I've tried concat and formatdatetime functions but those doesn't seem to work, or I'm using them the wrong way.

  • Damien_Rosario's avatar
    Damien_Rosario
    Silver Contributor

    Hi BryceKauffman 

     

    Try this:

     

    1. Use the Connector option Convert time zone.and configure it as you need to (see example).

     

     

    Ensure Base time is utcNow(), type the format you want to display the date in, choose source time zone as UTC and the destination being your local time zone.

     

     

    2. Simply refer to the Converted time in your file name.

     

     

    Hope that helps?

     

    Cheers

    Damien

  • BryceKauffman 

    You can use simply utcNow() in compose or if you want only date value of utc, you can use  formatDateTime(utcNow(),'dd-MM-yyyy') in compose and then you can use that compose output value in file creating.

Resources