Is there a way to convert an event timestamp to another timezone?
Hi Lois, Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Yes, you can convert event timestamps to another timezone, but the method depends on where you are working with the data: 1. In Mixpanel Exports and APIs:
Mixpanel stores all event timestamps in UTC. When exporting data, the $time
property in your raw event export is a Unix timestamp. For projects created before 1 Jan 2023, timestamps may be stored in your project’s timezone at ingestion, but for all projects, you should treat exported timestamps as UTC for further processing. If you need to convert these timestamps to another timezone, you should do so after export, using your own tools or scripts. Mixpanel recommends always sending imported data in UTC to ensure correct display in your project.
See more details here.2. In Data Warehouses (e.g., Snowflake):
If you are querying Mixpanel-exported data in a warehouse like Snowflake, you can use SQL functions to convert timestamps. For example, in Snowflake, you can use the CONVERT_TIMEZONE
function to convert UTC timestamps to your desired project timezone: LBKSSELECT TO_DATE(CONVERT_TIMEZONE('UTC','<PROJECT_TIMEZONE> ', time)) as ttime, count(**) FROM <DB_NAME> .<SCHEMA_NAME> .MP_MASTER_EVENT WHERE ttime> =TO_DATE('2021-12-03') AND ttime<=TO_DATE('2024-09-01') GROUP BY ttime ORDER BY ttime;LBKS
Replace <PROJECT_TIMEZONE>
, <DB_NAME>
, and <SCHEMA_NAME>
with your actual values. This query will give you event counts per day in your project’s timezone
Reference.**Summary:*
Mixpanel itself does not provide a built-in UI feature to convert event timestamps to another timezone, but you can do this easily after export using standard date/time conversion functions in your data processing tools or SQL queries. Always ensure you understand whether your project’s data is stored in UTC or project timezone, especially for projects created before 2023.
More info on timezones in Mixpanel.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
Let me check the knowledge base for you again. One moment! 📚
I'm sorry, but the knowledge sources do not explicitly mention the ability to convert event timestamps to another timezone using Mixpanel's custom properties feature. The documentation on custom properties describes combining and transforming properties using formulas, such as mathematical operations, string parsing, or date differences (e.g., calculating days between dates), but it does not reference timezone conversion functions or the ability to shift timestamps between timezones within the custom property formula builder Custom Properties: Calculate new properties on the fly.For timezone conversion, the recommended approach is to handle this outside of Mixpanel, such as in your data warehouse or after exporting the data Manage Timezones for Projects.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
Yes you can.
This is the formula to turn their UTC time into UK time. _A + 18000. Here is how to convert it to Pacific. _A - 10800. in both cases _A is the standard "time" property.
keep in mind, this is a number. Recast it by date.
Recast with the threedot menu.