Hi Haytham,
Thank you for writing in. Happy to help!
Currently, the event timestamp is not directly available for use in derived properties. However, there are a couple of workarounds you can consider.
1. Use the `server_upload_time` property: This property represents the time when the event data is received by Amplitude's servers. If your events are being ingested in real-time, the `server_upload_time` and `event_time` would be very close to each other. Here's an example of how you can use the `server_upload_time` property:
DIVIDE(
MINUS(
PROPERTY('server_upload_time','amplitude_user')
,
DATE_TO_LONG(
REGEXEXTRACT(
PROPERTY(
'first_insert_date',
'user'
),
"^\d{4}-\d{2}-\d{2}"
)
)
),
86400000
)
2. Create a custom property to track the event time: If you need to use the exact `event_time` in your calculations, one workaround could be to instrument a custom event property to track the event time on the client side, and then use this custom property in your derived property definition.
I hope this helps. Please don't hesitate to let me know if you have any questions.
Best regards,
Thao
P.S. Checkout upcoming events and user meetups on our events page.
Thank you, the server_upload_time isn’t exactly accurate for me but is close enough, I’ll use this approach!
It would be nice to get event_time added to the available properties to reference without additional instrumentation. Feels like it should be possible if server_upload_time is?