Get Specific Time

BlockTime

Get a specific time in the future or past in a variety of formats.

If you want to get the current time, use the "Get Current Date and Time" block instead.

Inputs

YearRequired

Year value.

Example: 2025

MonthRequired

Month value.

Example: 12

DayRequired

Day of month value.

Example: 10

HourRequired

Hour value (24h).

Example: 15

MinuteRequired

Minute value.

Example: 04

SecondRequired

Second value.

Example: 05

Outputs

Time (Unix)

Specified time in Unix seconds.

Example: 1700000000

Time (Unix Milli)

Specified time in Unix milliseconds.

Example: 1700000000000

Date (Year)

Year component.

Example: 2025

Date (Month)

Month component.

Example: 12

Date (Month Name)

Month name.

Example: December

Date (Day of Week)

Day of week (0=Sunday).

Example: 1

Date (Day of Month)

Day of month.

Example: 10

Date (Day Name)

Weekday name.

Example: Wednesday

Date (MM/DD/YYYY)

Date formatted as MM/DD/YYYY.

Example: 12/10/2025

Date (DD/MM/YYYY)

Date formatted as DD/MM/YYYY.

Example: 10/12/2025

Time (Hours)

Hour component (24h).

Example: 15

Time (Minutes)

Minute component.

Example: 04

Time (Seconds)

Second component.

Example: 05

Time (Milliseconds)

Millisecond component.

Example: 123

Time (HH:MM:SS)

Time formatted as HH:MM:SS.

Example: 15:04:05

Time (HH:MM)

Time formatted as HH:MM.

Example: 15:04

Time (Relative)

Human-readable relative time.

Example: in 1 hour

Build a bot using blocks like Get Specific 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_specific_time

Inputs

FieldInventScript nameValue
Yearyeare.g. "2025"
Monthmonthe.g. "12"
Daydaye.g. "10"
Hourhoure.g. "15"
Minuteminutee.g. "04"
Secondseconde.g. "05"

Outputs

FieldInventScript nameValue
Time (Unix)time_unixe.g. "1700000000"
Time (Unix Milli)time_unix_millie.g. "1700000000000"
Date (Year)date_yeare.g. "2025"
Date (Month)date_monthe.g. "12"
Date (Month Name)date_month_namee.g. "December"
Date (Day of Week)date_day_of_weeke.g. "1"
Date (Day of Month)date_day_of_monthe.g. "10"
Date (Day Name)date_day_namee.g. "Wednesday"
Date (MM/DD/YYYY)date_mm_dd_yyyye.g. "12/10/2025"
Date (DD/MM/YYYY)date_dd_mm_yyyye.g. "10/12/2025"
Time (Hours)time_hourse.g. "15"
Time (Minutes)time_minutese.g. "04"
Time (Seconds)time_secondse.g. "05"
Time (Milliseconds)time_millisecondse.g. "123"
Time (HH:MM:SS)time_hh_mm_sse.g. "15:04:05"
Time (HH:MM)time_hh_mme.g. "15:04"
Time (Relative)time_relativee.g. "in 1 hour"

Example InventScript

specificTime := get_specific_time(Args{
	year:   2025,
	month:  12,
	day:    10,
	hour:   15,
	minute: "04",
	second: "05",
})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Time (Unix): " + specificTime.time_unix,
})

More time blocks