ComfyUI > Nodes > Basic data handling > Extract Time Components

ComfyUI Node: Extract Time Components

Class Name

Basic data handling: TimeExtract

Category
Basic/time
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

Install this extension via the ComfyUI Manager by searching for Basic data handling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Basic data handling in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Extract Time Components Description

TimeExtract node simplifies extracting year, month, day, hour, minute, second, and weekday from DATETIME.

Extract Time Components:

The TimeExtract node is designed to simplify the process of breaking down a DATETIME object into its fundamental components, such as year, month, day, hour, minute, second, microsecond, and weekday. This node is particularly useful for AI artists and developers who need to manipulate or analyze specific parts of a date and time without dealing with complex date-time libraries. By providing a straightforward method to extract these components, the TimeExtract node enhances the flexibility and precision of time-related operations in your projects. It is especially beneficial when you need to perform operations based on specific time components, such as scheduling tasks or logging events.

Extract Time Components Input Parameters:

datetime

The datetime parameter is the core input for the TimeExtract node. It requires a DATETIME object, which represents a specific point in time. This parameter is crucial as it serves as the source from which all individual time components are extracted. There are no minimum, maximum, or default values for this parameter, as it simply needs to be a valid DATETIME object. The accuracy and relevance of the extracted components depend entirely on the datetime input provided.

Extract Time Components Output Parameters:

year

The year output represents the year component of the provided DATETIME object. It is an integer value that indicates the calendar year.

month

The month output is an integer representing the month of the year, ranging from 1 (January) to 12 (December).

day

The day output is an integer that specifies the day of the month, ranging from 1 to 31, depending on the month and year.

hour

The hour output is an integer indicating the hour of the day, using a 24-hour clock format, ranging from 0 to 23.

minute

The minute output is an integer representing the minute within the hour, ranging from 0 to 59.

second

The second output is an integer that specifies the second within the minute, ranging from 0 to 59.

microsecond

The microsecond output is an integer representing the microsecond component of the time, ranging from 0 to 999,999.

weekday

The weekday output is an integer that indicates the day of the week, where Monday is 0 and Sunday is 6. This is useful for determining the day of the week for scheduling or logging purposes.

Extract Time Components Usage Tips:

  • Use the TimeExtract node when you need to perform operations based on specific components of a date and time, such as filtering events by month or scheduling tasks on specific weekdays.
  • Combine the TimeExtract node with other time manipulation nodes to create complex workflows that require precise time component handling, such as calculating time differences or formatting dates for display.

Extract Time Components Common Errors and Solutions:

Invalid DATETIME object

  • Explanation: The input provided is not a valid DATETIME object, which is required for the node to function correctly.
  • Solution: Ensure that the input is a properly formatted DATETIME object. You can use nodes like TimeParse to convert strings into DATETIME objects if needed.

Missing DATETIME input

  • Explanation: The datetime input parameter is missing, preventing the node from extracting time components.
  • Solution: Provide a valid DATETIME object as input to the node to enable it to extract the necessary components.

Extract Time Components Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Extract Time Components