Get Current Date and Time

BlockTime

Get the current UTC date and time in various formats.

Outputs

Current Time (Unix)

Current UTC time in Unix seconds.

Example: 1700000000

Current Time (Unix Milli)

Current UTC time in Unix milliseconds.

Example: 1700000000000

Current Date (Year)

Current UTC year.

Example: 2025

Current Date (Month)

Current UTC month number.

Example: 12

Current Date (Month Name)

Current UTC month name.

Example: December

Current Date (Day of Week)

Current UTC day of week (0=Sunday).

Example: 1

Current Date (Day of Month)

Current UTC day of month.

Example: 10

Current Date (Day Name)

Current UTC weekday name.

Example: Wednesday

Current Date (MM/DD/YYYY)

Current UTC date formatted as MM/DD/YYYY.

Example: 12/10/2025

Current Date (DD/MM/YYYY)

Current UTC date formatted as DD/MM/YYYY.

Example: 10/12/2025

Current Time (Hours)

Current UTC hour (24h).

Example: 15

Current Time (Minutes)

Current UTC minute.

Example: 04

Current Time (Seconds)

Current UTC second.

Example: 05

Current Time (Milliseconds)

Current UTC millisecond.

Example: 123

Current Time (HH:MM:SS)

Current UTC time formatted as HH:MM:SS.

Example: 15:04:05

Current Time (HH:MM)

Current UTC time formatted as HH:MM.

Example: 15:04

Current Time (Relative)

Human-readable relative time.

Example: just now

Build a bot using blocks like Get Current Date and Time

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: get_current_datetime_basic

Outputs

FieldInventScript nameValue
Current Time (Unix)current_time_unixe.g. "1700000000"
Current Time (Unix Milli)current_time_unix_millie.g. "1700000000000"
Current Date (Year)current_date_yeare.g. "2025"
Current Date (Month)current_date_monthe.g. "12"
Current Date (Month Name)current_date_month_namee.g. "December"
Current Date (Day of Week)current_date_day_of_weeke.g. "1"
Current Date (Day of Month)current_date_day_of_monthe.g. "10"
Current Date (Day Name)current_date_day_namee.g. "Wednesday"
Current Date (MM/DD/YYYY)current_date_mm_dd_yyyye.g. "12/10/2025"
Current Date (DD/MM/YYYY)current_date_dd_mm_yyyye.g. "10/12/2025"
Current Time (Hours)current_time_hourse.g. "15"
Current Time (Minutes)current_time_minutese.g. "04"
Current Time (Seconds)current_time_secondse.g. "05"
Current Time (Milliseconds)current_time_millisecondse.g. "123"
Current Time (HH:MM:SS)current_time_hh_mm_sse.g. "15:04:05"
Current Time (HH:MM)current_time_hh_mme.g. "15:04"
Current Time (Relative)current_time_relativee.g. "just now"

Example InventScript

now := get_current_datetime_basic()
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Current Time (Unix): " + now.current_time_unix,
})

More time blocks