ComfyUI Node

Datetime String

Stamp the current date and time into a workflow

By jamesWalker55·Created 3 years ago·Updated about a year ago· 215
Datetime String
    • STRING
    format%Y-%m-%dT%H:%M:%S

    JWDatetimeString outputs the current date and time as text, formatted however you tell it. The obvious use is filenames: stamp a render with the moment it was made so every output is unique and sorts chronologically, no counter to manage. Instead of overwriting output.png every run, you get 2026-08-02T14-33-10.png and a folder that reads like a timeline.

    It's a small quality-of-life node, but "unique, sortable output names for free" is the kind of thing that saves you from accidentally clobbering a good result. Wire it into a save path and forget about it.

    How it works

    Every time the node runs it reads the current clock and formats it with a Python strftime string. The default %Y-%m-%dT%H:%M:%S gives you an ISO-style timestamp like 2026-08-02T14:33:10. The format codes are the standard ones:

    • %Y four-digit year, %m month, %d day
    • %H hour (24h), %M minute, %S second

    So %Y%m%d20260802, and %Y-%m-%d_%H-%M-%S2026-08-02_14-33-10. Mix in literal text freely: render_%Y%m%d works fine.

    The inputs and outputs that matter

    • format (STRING) - the strftime format, default %Y-%m-%dT%H:%M:%S. This is the only input, and it's the knob that matters - shape the timestamp to whatever your filenames or labels need.
    • Output: STRING - the formatted date/time text.

    How to install it

    Part of jamesWalker55/comfyui-various, a pack of small utility nodes.

    • ComfyUI Manager: search "Various ComfyUI Nodes by Type", install, restart. Red node from a downloaded workflow? Install Missing Custom Nodes.
    • Manually:
      cd ComfyUI/custom_nodes
      git clone https://github.com/jamesWalker55/comfyui-various
      
      Restart afterward. No models, no dependencies.

    Under the jamesWalker55 category after restart.

    Common issues

    • Colons in a filename cause trouble. The default format uses : for the time, and Windows (and some tools) won't allow colons in filenames. If you're building a save path, swap to something like %Y-%m-%d_%H-%M-%S with dashes and underscores instead. This is the single most common gotcha with this node.
    • Which clock is it? The timestamp reflects the machine ComfyUI is running on, in that machine's timezone. On a cloud or serverless host, that's the server's clock, which may be UTC rather than your local time - expect a possible offset.
    • The value looked cached. It's evaluated when the node runs. If a run is served entirely from cache and nothing re-executes, you may see a stale value; a fresh execution updates it.
    • Node is red / missing. The pack isn't installed. Install via Manager or clone the repo, then restart.

    Pair it with JWStringConcat to sandwich the timestamp between a prefix and an extension, and you've got tidy, collision-proof output names with zero bookkeeping.

    CategoryjamesWalker55

    Inputs (1)

    NameTypeDefaultDescription
    formatSTRING%Y-%m-%dT%H:%M:%S

    Outputs (1)

    NameTypeDescription
    STRINGSTRING