π Format Date Time
Format Date Time β ComfyUI Node Guide
- formatted_date_time
Half the point of automating anything is not overwriting yesterday's output with today's, and the cheapest way to guarantee that is to bake the current date and time into your filenames and folders. That's this node's entire job: it reads the system clock at the moment your workflow runs and turns it into whatever string format you tell it to, using Python's strftime directive syntax - the same convention you've probably seen in scripting languages generally, not something this pack invented.
The default format, %Y-%m-%d/%Y-%m-%d - %H.%M.%S, is a reasonable one to start from: a dated folder followed by a full timestamp, which is also exactly the pattern this pack's own Save Text File With Path node uses inline via its [time(...)] template syntax for the same purpose. If you'd rather build your own, the tooltip lists the full directive table: %Y/%m/%d for year/month/day, %H/%M/%S for 24-hour time, %A/%a for full/abbreviated weekday name, %B/%b for full/abbreviated month name, %j for day-of-year, and a few less common ones for week numbering. Combine them freely - %Y-%m-%d_%H%M%S is a common flat alternative if you don't want nested folders.
The one input that isn't obviously about formatting is respect_system_locale. Two of the directives, %x and %c, are locale-dependent shorthand for "the date, however this system normally writes dates" - which on a US-configured machine could mean MM/DD/YY and on most of the rest of the world means something else entirely. Leave this off (the default) and the node forces %x to a consistent YYYY-MM-DD regardless of what machine it's running on; turn it on only if you deliberately want output that matches whatever locale ComfyUI's host system is set to. This matters more than it sounds like the first time you share a workflow with someone on a different continent and your folder names silently stop matching.
Output: a single formatted_date_time string, ready to feed into a path, a filename prefix, a save-metadata field, or anywhere else you need a timestamp as text rather than as a separate node's built-in template.
Installing it is the standard route for this whole pack - ComfyUI Manager, search "ComfyUI-mnemic-nodes," or git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes into custom_nodes and restart. It's pure Python standard-library formatting under the hood, so there's nothing to download and nothing that can conflict with other nodes' dependencies.
Practical gotcha: this node reads the clock once, at the moment it runs - it has no seed or counter of its own. If you're generating a fast batch and rely on the timestamp alone to keep filenames unique, two saves inside the same second will collide. That's exactly why Save Text File With Path pairs a counter with its date template rather than trusting the timestamp alone to be unique - if you're building your own save path around this node's output, add your own counter for the same reason.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| date_format | STRING | %Y-%m-%d/%Y-%m-%d - %H.%M.%S | Formats a date string using Python's strftime directives. %Y: Year (e.g., 2025) %m: Month (01-12) %d: Day of month (01-31) %H: Hour (24-hour clock) (00-23) %S: Second (00-59) %f: Microsecond (000000-999999) %x: Date representation %X: Time (. to separate instead of :) %c: Date and time representation %p: AM/PM %A: Weekday full name (e.g., Thursday) %a: Weekday abbreviated name (e.g., Thu) %B: Month full name (e.g., August) %b: Month abbreviated name (e.g., Aug) %j: Day of year (001-366) %W: Week number of year (Monday as first day) (00-53) %w: Day index of week (Monday is 0) (0-6) %U: Week number of year (Sunday as first day) (00-53) %u: Day index of week (Sunday is 0) (0-6) %%: A literal '%' character |
| respect_system_locale | BOOLEAN | false | If enabled, %x and %c will use the system's locale settings (which might be MM/DD/YY). If disabled, %x forces YYYY-MM-DD. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| formatted_date_time | STRING | β |