🐟Time Formatter
A current-time stamp for filenames, watermarks, and logs
- STRING
🐟Time Formatter does one thing: returns the current time as a formatted string. That's it - one input, one output, no models, no network, no translator. It's the pack's most boring node and also the one you'll actually use constantly once you realize how useful a timestamp is. Every time a node saves a file or stamps a log, a time string makes that output findable later.
How it works
One input, format_string, using Python's strftime syntax. Default is %Y-%m-%d %H:%M:%S (so something like 2026-08-12 14:03:09), but you can go much weirder:
%Y-%m-%d → 2026-08-12
%H:%M:%S → 14:03:09
现在是%Y年%m月%d日 → 现在是2026年08月12日
The codes are standard: %Y four-digit year, %m month, %d day, %H 24-hour hour, %M minute, %S second. The output is a single STRING - the formatted time. If your format string is invalid, you get the error message back as the output rather than a crash, which is friendly enough.
Two details worth knowing. The node sets IS_CHANGED = true, so it re-evaluates on every execution - each run gets a fresh timestamp rather than a cached one. And it's evaluated at node execution time, so if you stamp a filename upstream of a save node, the timestamp reflects when the workflow ran, not when you built it.
The obvious uses
- Unique filenames - feed it into a save/export node's path and every output gets its own timestamped name instead of overwriting the last one.
- Watermarking / logging - bake the time into a metadata string or a console log line.
- Batch sanity - append the timestamp to a prompt or filename so you can tell which run produced which output at a glance.
Installing
ComfyUI Manager, search "ComfyUI-String-Helper", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/liuqianhonga/ComfyUI-String-Helper.git
This node is pure Python stdlib (datetime). The pack does declare translators and chardet in requirements.txt, but neither is touched here - if you only installed this pack for the timestamp node, you could run it fine without those.
Bottom line
There are ComfyUI nodes with more features - a date/time picker that also does localization, or ones that add offsets. But most of those pull in dependencies you don't need. TimeFormatter is the no-frills version: predictable, zero setup, and it does the 90% case (a formatted timestamp in a string) without making you think. For a beginner, that's exactly the right tool to reach for.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| format_string | STRING | %Y-%m-%d %H:%M:%S | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |