Nodes/ComfyUI Sokes Nodes 🦬/Current Date and Time 🦬
ComfyUI Node

Current Date and Time 🦬

A timestamp node that speaks human before it speaks Python

By m-sokes·Created 3 years ago·Updated 16 days ago· 4
Current Date and Time 🦬
    • date_format
    â—„date_time_formatYYYY-MM-DDâ–º

    Boring node, surprisingly handy. Current Date and Time just outputs the current date and/or time as a string - but it's friendlier about it than most. You type YYYY-MM-DD and get 2026-08-11, no strftime brain-twisting required. It's the one-node answer to "how do I put a timestamp in my filename without it being a wall of %y%m%d_%H%M%S?"

    It's part of the same Sokes Nodes 🦬 pack as Save File Path and Name and Global Folder and Project Settings, so if you're already using those for organized output, this is the natural companion for the little timestamp pieces.

    How it works

    It's a thin wrapper around Python's datetime.now().strftime(), with a translation layer so you don't have to know strftime to get results. It replaces YYYY → %Y, MM → %m, DD → %d (case-insensitive), so human-ish formats just work. It also handles a standalone M and D - those become the month and day without leading zeros, so YYYY-M-D gives you 2026-8-11 instead of 2026-08-11. And if you do speak strftime, it passes raw codes straight through, so %H:%M:%S works too.

    One input, one output:

    • date_time_format - the format string. Default YYYY-MM-DD.
    • date_format - the resolved string, e.g. 2026-08-11.

    Install

    Same pack, same story: ComfyUI Manager → search "ComfyUI Sokes Nodes" → Install, restart.

    cd ComfyUI/custom_nodes
    git clone https://github.com/m-sokes/ComfyUI-Sokes-Nodes.git
    pip install -r requirements.txt
    

    The gotcha that's actually a feature

    This node deliberately reports itself as changed on every single evaluation - it returns the current timestamp as its change hash. That means ComfyUI never caches it, which is exactly what you want for a filename timestamp. But it also means it forces a re-run of anything downstream every time the graph executes. If you're using it purely for naming, that's fine. If you wired it into a node you expected to cache, you'll wonder why everything re-runs.

    Where people actually use it: feeding date_format into the pack's Save File Path node, or concatenating it into a filename string before a save node. That's the whole job, and it does it without you ever looking up strftime codes again.

    CategorySokes 🦬

    Inputs (1)

    NameTypeDefaultDescription
    date_time_formatSTRINGYYYY-MM-DD—

    Outputs (1)

    NameTypeDescription
    date_formatSTRING—