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,
})
Get Specific Time
Get a specific time in the future or past in a variety of formats.
Inputs
Year value.
Example: 2025
Month value.
Example: 12
Day of month value.
Example: 10
Hour value (24h).
Example: 15
Minute value.
Example: 04
Second value.
Example: 05
Outputs
Specified time in Unix seconds.
Example: 1700000000
Specified time in Unix milliseconds.
Example: 1700000000000
Year component.
Example: 2025
Month component.
Example: 12
Month name.
Example: December
Day of week (0=Sunday).
Example: 1
Day of month.
Example: 10
Weekday name.
Example: Wednesday
Date formatted as MM/DD/YYYY.
Example: 12/10/2025
Date formatted as DD/MM/YYYY.
Example: 10/12/2025
Hour component (24h).
Example: 15
Minute component.
Example: 04
Second component.
Example: 05
Millisecond component.
Example: 123
Time formatted as HH:MM:SS.
Example: 15:04:05
Time formatted as HH:MM.
Example: 15:04
Human-readable relative time.
Example: in 1 hour
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
get_specific_timeInputs
| Field | InventScript name | Value |
|---|---|---|
| Year | year | e.g. "2025" |
| Month | month | e.g. "12" |
| Day | day | e.g. "10" |
| Hour | hour | e.g. "15" |
| Minute | minute | e.g. "04" |
| Second | second | e.g. "05" |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Time (Unix) | time_unix | e.g. "1700000000" |
| Time (Unix Milli) | time_unix_milli | e.g. "1700000000000" |
| Date (Year) | date_year | e.g. "2025" |
| Date (Month) | date_month | e.g. "12" |
| Date (Month Name) | date_month_name | e.g. "December" |
| Date (Day of Week) | date_day_of_week | e.g. "1" |
| Date (Day of Month) | date_day_of_month | e.g. "10" |
| Date (Day Name) | date_day_name | e.g. "Wednesday" |
| Date (MM/DD/YYYY) | date_mm_dd_yyyy | e.g. "12/10/2025" |
| Date (DD/MM/YYYY) | date_dd_mm_yyyy | e.g. "10/12/2025" |
| Time (Hours) | time_hours | e.g. "15" |
| Time (Minutes) | time_minutes | e.g. "04" |
| Time (Seconds) | time_seconds | e.g. "05" |
| Time (Milliseconds) | time_milliseconds | e.g. "123" |
| Time (HH:MM:SS) | time_hh_mm_ss | e.g. "15:04:05" |
| Time (HH:MM) | time_hh_mm | e.g. "15:04" |
| Time (Relative) | time_relative | e.g. "in 1 hour" |