how to get minutes difference between to properties of an event
Hi Paritosh d., 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
To calculate the time difference in minutes between two properties of an event in Mixpanel, you can use custom properties. Here's how you can do it:1. First, ensure that the two properties you want to compare are date/time properties.2. Create a custom property that calculates the difference between these two date properties. You can use the following formula:LBKS(TO_DATETIME([Property2]) - TO_DATETIME([Property1])) / 60000LBKS
This formula does the following:
- Converts both properties to datetime format using TO_DATETIME()
- Subtracts the earlier date from the later date
- Divides the result by 60000 to convert milliseconds to minutes3. You can then use this custom property in your Mixpanel reports to analyze the time difference in minutes.This approach is based on the information provided in the Custom Properties documentation. The documentation states that you can "Compute the date/time difference between two date properties" using custom properties.Remember that the exact syntax might vary depending on the specific format of your date properties. If you encounter any issues, you may need to adjust the formula or consult Mixpanel's documentation for more specific guidance on working with your particular date formats.
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.