Parse Unix Time

BlockTime

Parse a Unix timestamp into a human-readable date and time.

Inputs

Unix TimeRequired

Unix timestamp to parse.

Example: 1700000000

Outputs

Parsed Date (Year)

Year component.

Example: 2025

Parsed Date (Month)

Month component.

Example: 12

Parsed Date (Month Name)

Month name.

Example: December

Parsed Date (Day of Week)

Day of week (0=Sunday).

Example: 1

Parsed Date (Day of Month)

Day of month.

Example: 10

Parsed Date (Day Name)

Weekday name.

Example: Wednesday

Parsed Date (MM/DD/YYYY)

Date formatted as MM/DD/YYYY.

Example: 12/10/2025

Parsed Date (DD/MM/YYYY)

Date formatted as DD/MM/YYYY.

Example: 10/12/2025

Parsed Date (YYYY/MM/DD)

Date formatted as YYYY/MM/DD.

Example: 2025/12/10

Parsed Date (YYYY-MM-DD)

Date formatted as YYYY-MM-DD (ISO 8601).

Example: 2025-12-10

Parsed Date (MM-DD-YYYY)

Date formatted as MM-DD-YYYY.

Example: 12-10-2025

Parsed Date (DD-MM-YYYY)

Date formatted as DD-MM-YYYY.

Example: 10-12-2025

Parsed DateTime (ISO 8601)

Full date and time formatted as YYYY-MM-DDTHH:MM:SSZ.

Example: 2025-12-10T15:04:05Z

Parsed Date (Day of Year)

Day of the year (1-366).

Example: 344

Parsed Time (Hours)

Hour component (24h).

Example: 15

Parsed Time (Minutes)

Minute component.

Example: 04

Parsed Time (Seconds)

Second component.

Example: 05

Parsed Time (Milliseconds)

Millisecond component.

Example: 123

Parsed Time (HH:MM:SS)

Time formatted as HH:MM:SS.

Example: 15:04:05

Parsed Time (HH:MM)

Time formatted as HH:MM.

Example: 15:04

Parsed Time (Relative)

Human-readable relative time.

Example: 2 hours ago

Build a bot using blocks like Parse Unix 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: parse_unix_time

Inputs

FieldInventScript nameValue
Unix Timeunix_timee.g. "1700000000"

Outputs

FieldInventScript nameValue
Parsed Date (Year)parsed_date_yeare.g. "2025"
Parsed Date (Month)parsed_date_monthe.g. "12"
Parsed Date (Month Name)parsed_date_month_namee.g. "December"
Parsed Date (Day of Week)parsed_date_day_of_weeke.g. "1"
Parsed Date (Day of Month)parsed_date_day_of_monthe.g. "10"
Parsed Date (Day Name)parsed_date_day_namee.g. "Wednesday"
Parsed Date (MM/DD/YYYY)parsed_date_mm_dd_yyyye.g. "12/10/2025"
Parsed Date (DD/MM/YYYY)parsed_date_dd_mm_yyyye.g. "10/12/2025"
Parsed Date (YYYY/MM/DD)parsed_date_yyyy_mm_dd_slashe.g. "2025/12/10"
Parsed Date (YYYY-MM-DD)parsed_date_yyyy_mm_dde.g. "2025-12-10"
Parsed Date (MM-DD-YYYY)parsed_date_mm_dd_yyyy_dashe.g. "12-10-2025"
Parsed Date (DD-MM-YYYY)parsed_date_dd_mm_yyyy_dashe.g. "10-12-2025"
Parsed DateTime (ISO 8601)parsed_datetime_iso8601e.g. "2025-12-10T15:04:05Z"
Parsed Date (Day of Year)parsed_date_day_of_yeare.g. "344"
Parsed Time (Hours)parsed_time_hourse.g. "15"
Parsed Time (Minutes)parsed_time_minutese.g. "04"
Parsed Time (Seconds)parsed_time_secondse.g. "05"
Parsed Time (Milliseconds)parsed_time_millisecondse.g. "123"
Parsed Time (HH:MM:SS)parsed_time_hh_mm_sse.g. "15:04:05"
Parsed Time (HH:MM)parsed_time_hh_mme.g. "15:04"
Parsed Time (Relative)parsed_time_relativee.g. "2 hours ago"

Example InventScript

parseUnixTime := parse_unix_time(Args{unix_time: "1700000000"})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Parsed Date (Year): " + parseUnixTime.parsed_date_year,
})

More time blocks