Standard Format Date and Time

BlockTime

Format a Unix timestamp into a standardized date and time string.

Inputs

Unix TimeRequired

Unix timestamp to format.

Example: 1700000000

FormatRequired

Standard library format to use.

OptionsRFC 3339ANSICUnix DateRuby DateRFC 822RFC 822ZRFC 850RFC 1123RFC 1123ZRFC 3339Nano

Outputs

Formatted Time

Formatted date/time string.

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

Build a bot using blocks like Standard Format 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: machine_format_datetime

Inputs

FieldInventScript nameValue
Unix Timeunix_timee.g. "1700000000"
Formatformat"RFC 3339", "ANSIC", "Unix Date", "Ruby Date", "RFC 822", "RFC 822Z", "RFC 850", "RFC 1123", "RFC 1123Z", "RFC 3339Nano"

Outputs

FieldInventScript nameValue
Formatted Timeformatted_timee.g. "2025-12-10T15:04:05Z"

Example InventScript

machineFormatDatetime := machine_format_datetime(Args{unix_time: "1700000000", format: "RFC 3339"})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Formatted Time: " + machineFormatDatetime.formatted_time,
})

More time blocks