How to append formatted date to file name?
Comments
- 
            
Is there a built-in way to add a formatted date to a filename? I want the date in format YYYY-MM-DD, and I want to maintain zeros as part of the date. For example, today is 27 August 2020, so that would be 2020-08-27. For example, 1 September 2020 would be 2020-09-01.
I’m able to use a “Replace Text in String” step to add the date, but the leading zeros in the month and day elements are lost. I am using Merge Plain Text for the “new Text to Insert” element of that step, and I’m using the following fields to get the current date:
[ul][li]Flow Data.StartTime.Year.Unformatted[/li][li]Flow Data.StartTime.Month.Unformatted[/li][li]Flow Data.StartTime.Day.Unformatted[/li][/ul]
I tried using Data.StartTime.Month.Default, but I still lose the leading zero. - 
            
[font=Roboto, Arial, Helvetica, sans-serif]Ive created an example of how you might update the filename of documents with the current date at a constant length. Feel free to import, review, and modify it at your convenience. The key factor is that current_date.month and current_date.day will always be single-digit if the month or day is 9 or below. This example checks these values and adds a preceding zero XOR the date/month is < 9.[/font]
 
Howdy, Stranger!
Categories
- 4.5K All Categories
 - 88 General
 - 13 Training
 - 214 Installation / Setup
 - 1.2K Flows
 - 112 Rules
 - 277 Administration
 - 215 Portal
 - 503 General Q & A
 - 722 Forms
 - 356 Reports
 - 3 Designer Extensions
 - 47 Example Flows
 - 58 CSS Examples
 - 1 Diagram Tile
 - 8 Javascript Controls
 - 190 Pages
 - 5 Process Mining
 - New Features
 - 187 Datastructures
 - 73 Repository
 - 238 Integrations
 - 30 Multi-Tenant
 - 27 SDK
 - 81 Modules
 - 60 Settings
 - 27 Active Directory
 - 12 Version 7
 - 37 Version 8
 - 143 Lunch And Learn Questions