> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xano.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Timestamp

## &#x20;add\_ms\_to\_timestamp

`value|add_ms_to_timestamp:milliseconds`

> [accordion] Examples
>
> ```javascript theme={null}
> 1698710400000|add_ms_to_timestamp:5000     // Adds 5 seconds (5000ms) to timestamp
> 1698710400000|add_ms_to_timestamp:-2000    // Subtracts 2 seconds (2000ms) from timestamp
> ```

## &#x20;add\_secs\_to\_timestamp

`value|add_secs_to_timestamp:seconds`

> [accordion] Examples
>
> ```javascript theme={null}
> 1698710400000|add_secs_to_timestamp:60     // Adds 60 seconds to timestamp
> 1698710400000|add_secs_to_timestamp:-30    // Subtracts 30 seconds from timestamp
> ```

## &#x20;format\_timestamp

`value|format_timestamp:"format":"timezone"`

Formats a timestamp (in milliseconds) to a human-readable string using the specified format and timezone.

> [accordion] Examples
>
> ```javascript theme={null}
> 1698710400000|format_timestamp:"Y-m-d":"UTC"     // Returns "2023-10-31"
> 1698710400000|format_timestamp:"H:i:s":"America/New_York"    // Returns time in ET
> ```

## &#x20;parse\_timestamp

`value|parse_timestamp:"format":"timezone"`

Parses a date/time string into a timestamp (milliseconds since epoch) using the specified format and timezone.

> [accordion] Examples
>
> ```javascript theme={null}
> "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
> ```

## &#x20;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.

> [accordion] Examples
>
> ```javascript theme={null}
> 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
> ```


## Related topics

- [Timestamp](https://docs.xano.com/the-function-stack/data-types/timestamp.md)
- [Create a timestamp column](https://docs.xano.com/api-reference/table-schema-type/create-a-timestamp-column.md)
- [Create a timestamp column for storing precise date and time values](https://docs.xano.com/xano-features/metadata-api/instance_api/create_a_timestamp_column_for_storing_precise_date_and_time_values.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.