Timestamp (STRING)
Never overwrite a run again — unique timestamps, straight into your filenames
- time
You're running a long experiment and every PNG comes out named ComfyUI_00042_.png. Then you want to save your prompt info per run, or write logs, and suddenly you need a unique string you can stick into a filename. Timestamp (STRING) (RF_Timestamp) is that string: it returns the current date and time, formatted however you want, ready to be concatenated into any filename or label in your workflow.
The reason it exists is a subtle ComfyUI behavior. Normally ComfyUI caches nodes whose inputs haven't changed - a text node that outputs the same string twice won't even re-execute. A timestamp must re-execute every run or it's worthless, so the node implements IS_CHANGED to always return a fresh value. In plain terms: it fires every single time you hit Queue, and you get a new string each time.
How it works
It's a one-liner under the hood: datetime.now().strftime(format). The format input is a standard Python strftime pattern, and it's the only input.
- format - default
%Y-%m-%d_%H%M%S, which produces something like2026-08-11_143022. That specific format is filename-safe on Windows and Linux, which is clearly the intent. Change it to any strftime pattern you like:%Y%m%dfor a compact date,%H:%M:%Sfor a clock you read in a label,%Afor the day of the week.
Output: time - the formatted STRING. Wire it into anything that takes a string: a filename prefix, a text concatenate, a Save Prompt Info node, a watermark.
The pattern that actually matters
The timestamp only earns its keep when you combine it with something that writes a file. Concatenate it into the filename_prefix of a Save Image or Save Prompt Info node and every run gets a unique, chronological filename. That turns a pile of ComfyUI_00047_.json into 2026-08-11_143022.json - and if you're running parallel jobs on the same output folder, the timestamp is what stops them from colliding.
Installing RF Nodes
No dependencies, no models. Via ComfyUI Manager search "RF Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/foxtrot-roger/comfyui-rf-nodes
Restart ComfyUI; the node is under RF in the menu.
Common issues
- Use filename-safe formats. A format like
%H:%M:%Scontains colons, which Windows won't let you put in a filename. The default avoids this; if you override it for a filename, keep it to letters, digits, dashes and underscores. - "It doesn't update unless I change something." - It should, every run, because of the
IS_CHANGEDhack. If it isn't, check you're actually re-running the graph (a fully cached graph with a fixed seed can skip downstream nodes). - It's local time, not UTC. If you're comparing runs across machines or timezones, that's on you - the node just reports the machine's clock.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| format | STRING | %Y-%m-%d_%H%M%S | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| time | STRING | — |