snowflakeTimestamp := get_snowflake_timestamp(Args{snowflake_id: "123456789012345678"})
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Snowflake Timestamp (Unix): " + snowflakeTimestamp.snowflake_timestamp_unix,
})
Get Snowflake Timestamp
Convert a Discord snowflake ID into a creation date and time.
Inputs
Snowflake ID to decode.
Example: 123456789012345678
Outputs
Creation time in Unix seconds.
Example: 1700000000
Creation time in Unix milliseconds.
Example: 1700000000000
Creation year.
Example: 2025
Creation month number.
Example: 12
Creation month name.
Example: December
Creation day of week (0=Sunday).
Example: 1
Creation day of month.
Example: 10
Creation weekday name.
Example: Wednesday
Creation date formatted as MM/DD/YYYY.
Example: 12/10/2025
Creation date formatted as DD/MM/YYYY.
Example: 10/12/2025
Creation hour (24h).
Example: 15
Creation minute.
Example: 04
Creation second.
Example: 05
Creation millisecond.
Example: 123
Creation time formatted as HH:MM:SS.
Example: 15:04:05
Creation time formatted as HH:MM.
Example: 15:04
Human-readable relative creation time.
Example: a few seconds ago
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_snowflake_timestampInputs
| Field | InventScript name | Value |
|---|---|---|
| Snowflake ID | snowflake_id | e.g. "123456789012345678" |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Snowflake Timestamp (Unix) | snowflake_timestamp_unix | e.g. "1700000000" |
| Snowflake Timestamp (Unix Milli) | snowflake_timestamp_unix_milli | e.g. "1700000000000" |
| Snowflake Date (Year) | snowflake_date_year | e.g. "2025" |
| Snowflake Date (Month) | snowflake_date_month | e.g. "12" |
| Snowflake Date (Month Name) | snowflake_date_month_name | e.g. "December" |
| Snowflake Date (Day of Week) | snowflake_date_day_of_week | e.g. "1" |
| Snowflake Date (Day of Month) | snowflake_date_day_of_month | e.g. "10" |
| Snowflake Date (Day Name) | snowflake_date_day_name | e.g. "Wednesday" |
| Snowflake Date (MM/DD/YYYY) | snowflake_date_mm_dd_yyyy | e.g. "12/10/2025" |
| Snowflake Date (DD/MM/YYYY) | snowflake_date_dd_mm_yyyy | e.g. "10/12/2025" |
| Snowflake Time (Hours) | snowflake_time_hours | e.g. "15" |
| Snowflake Time (Minutes) | snowflake_time_minutes | e.g. "04" |
| Snowflake Time (Seconds) | snowflake_time_seconds | e.g. "05" |
| Snowflake Time (Milliseconds) | snowflake_time_milliseconds | e.g. "123" |
| Snowflake Time (HH:MM:SS) | snowflake_time_hh_mm_ss | e.g. "15:04:05" |
| Snowflake Time (HH:MM) | snowflake_time_hh_mm | e.g. "15:04" |
| Snowflake Time (Relative) | snowflake_time_relative | e.g. "a few seconds ago" |