π Format Date Time
A timestamp you can wire into filenames and folders
- formatted_date_time
π
Format Date Time takes the current moment and renders it as a string using standard strftime directives. That's the entire node. The reason it exists is that ComfyUI's save nodes have their own filename templating, and once you want the date in three places - folder, filename, a text log - you want one node producing one value rather than three widgets drifting apart.
You feed formatted_date_time (a STRING) into a filename_prefix, a folder, the Save Text File With Path node, a filename you build with a string concat node, wherever. It's plumbing, in the good sense: it exists to fight repetition.
The format string
date_format takes Python's strftime codes:
| Token | Meaning |
|---|---|
| %Y %m %d | year, month, day |
| %H %M %S %f | hours, minutes, seconds, microseconds |
| %A %a / %B %b | weekday full/short, month full/short |
| %j %W %U %w %u | day-of-year, week numbers, weekday index |
| %p | AM/PM |
| %x %X %c | date, time, date+time (locale-dependent) |
| %% | a literal % |
The default is %Y-%m-%d/%Y-%m-%d - %H.%M.%S - note the slash. That's a date folder plus a date-stamped filename in one string, which tells you exactly where the author expects this to be used: pasted into a saver's path and prefix templates.
Two details worth knowing, both straight from the node's own tooltip:
%Xuses dots instead of colons.hh.mm.ss, nothh:mm:ss. That's deliberate - colons are legal in a Linux filename and illegal on Windows, so a format with colons in it produces a broken or silently sanitised filename depending on your OS. If you're generating paths, use%Xand not a hand-rolled%H:%M:%S.respect_system_localedecides what%xand%cmean. Off (the default) they're pinned toYYYY-MM-DDandYYYY-MM-DD HH.MM.SS, so your output looks the same on every machine. On, you inherit your OS locale, which on a US system gives youMM/DD/YY- which is how you end up with a folder named for the 3rd of April when you meant the 4th.
The thing that trips people up
The node runs every queue, and it reads the clock at run time, so the value changes between runs unless you use the same format that resolves to the same string. That's the point, but it has two consequences: your graph never fully caches upstream of this node, and if you're stamping a filename inside a loop over a folder, every file in that queue can land with almost the same timestamp - a second apart, or identical if you only went down to the minute.
If you want one timestamp for a whole session, render it once, note the value, and hardcode it. If you want per-image stamps, you're fine, just don't expect the sort order to be obvious at a glance - %Y-%m-%d first is the right call for that, which is exactly what the default does.
Install
The pack is on the Comfy Registry, so ComfyUI Manager β search ComfyUI-mnemic-nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes
Restart. No models, no extra downloads - this one is pure standard library, though the pack itself pulls transformers, opencv-python, tiktoken, imageio and piexif at install time because other nodes need them.
Since v3.0.0 the pack is written against the newer V3 node API with automatic migration of old workflows and a ? help page on every node, so the tooltip above is the author's own, live in the UI.
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 | The current date and time rendered with the format above. |