Xano Documentation
Search…
πŸ’‘
Start here
☁️ Your Xano Account
πŸ’²
Special Discount Pricing
Timestamp Filters
A timestamp is a sequence of characters or encoded information identifying when a certain event occurred.
For information on how Xano stores, reads, and formats timestamps visit the Timestamp page.
​
to_timestamp: In this example, the timezone UTC is important because 'last Monday' means different things depending on timezone. It's important to specify a timezone for 'last Monday' because it could 'last Monday' at 00:00:00 PST is different than 'last Monday at 00:00:00 UTC (or any other timezone). Xano stores it in Unix timestamps which is a specific number in milliseconds.
​
However, if the timezone was present like in this example, then the timezone would not have any effect. In this example 'now' would be the same Unix timestamp, regardless of timezone. Therefore, a specified timezone like UTC, is not necessary.
​
​
add_ms_to_timestamp: Add milliseconds to a timestamp, (negative values are ok).
This filter will change the timestamp from 1593046644 to 1593546644.
add_secs_to_timestamp: Add seconds to a timestamp, (negative values are ok).
This filter will change the timestamp from 1593046644 to 1593546644.
format_timestamp: Converts a timestamp into a human-readable formatted date based on the supplied format. This format follows this PHP DateTime format list. M is month like Jul, Y is year, etc. Timezone regions are listed here.
The β€œr” format displays the entire date including timezone offset. America/Los_Angeles timezone will have an offset for that timezone. The result would look like: Mon, 09 Nov 2020 17:28:05 -0800
​
This filter will convert the Unix timestamp to 2020-07-02 16:14:25 using the Y-m-d H:i:s format.
​
transform_timestamp: This allows you to use relative time formats that are anchored around a previous time. Use the link to see various relative time formats that Xano accepts.
This example is saying last Monday of PST, at the start of the day (00:00:00)
​
Last modified 10mo ago
Copy link