Skip to main content

/images/icons/xs_temp.svg add_ms_to_timestamp

value|add_ms_to_timestamp:milliseconds
1698710400000|add_ms_to_timestamp:5000     // Adds 5 seconds (5000ms) to timestamp
1698710400000|add_ms_to_timestamp:-2000    // Subtracts 2 seconds (2000ms) from timestamp

/images/icons/xs_temp.svg add_secs_to_timestamp

value|add_secs_to_timestamp:seconds
1698710400000|add_secs_to_timestamp:60     // Adds 60 seconds to timestamp
1698710400000|add_secs_to_timestamp:-30    // Subtracts 30 seconds from timestamp

/images/icons/xs_temp.svg format_timestamp

value|format_timestamp:"format":"timezone" Formats a timestamp (in milliseconds) to a human-readable string using the specified format and timezone.
1698710400000|format_timestamp:"Y-m-d":"UTC"     // Returns "2023-10-31"
1698710400000|format_timestamp:"H:i:s":"America/New_York"    // Returns time in ET

/images/icons/xs_temp.svg parse_timestamp

value|parse_timestamp:"format":"timezone" Parses a date/time string into a timestamp (milliseconds since epoch) using the specified format and timezone.
"2023-10-31"|parse_timestamp:"Y-m-d":"UTC"    // Returns 1698710400000
"15:30:00"|parse_timestamp:"H:i:s":"UTC"      // Converts time to epoch ms

/images/icons/xs_temp.svg transform_timestamp

value|transform_timestamp:"relative_expression":"timezone" Transforms a timestamp by applying a relative date/time expression (e.g., “+7 days”, “last Monday”, “first day of this month”) in the specified timezone. Returns the resulting timestamp in milliseconds.
1698710400000|transform_timestamp:"+7 days":"UTC"         // Adds 7 days to the timestamp
1698710400000|transform_timestamp:"last Monday":"UTC"     // Moves to the previous Monday
1698710400000|transform_timestamp:"first day of this month":"UTC" // Moves to first day of month
I