I’m learning/testing the platform and I want to know if it’s possible and how to filter by a range of hour. Assuming the following test data (screenshot) on the property “sessionCreatedAt” it’s possible to perform a filter like “every event of Session Create between 20:00 and 23:00” ?
It would be cool if exists any documentation/guide about how am I supposed to filter datetimes values.
Page 1 / 1
Hi @Cherry Ramatis
If you want to filter on daily session create events which occur between specific hours, then the “Event Hour of Day” property filter will be useful. Something like this demo chart. This makes sense if your sessionCreatedAt property reflects the event timestamp.
If not, then a simple comparison of your timestamp should work. Here, I’m using the the server upload time property having the similar format as your sessionCreatedAt property
Let me know if I have interpreted your question correctly. Hope this helps.
Sure it helps! This comparison absolutely works on my side, but if I want to search by only the time frame value like on your example "> 6h AND < 20h" without referring to the date I need to upload a numeric property like hour? I can't refer it from this ISO date alone?
Thanks for taking the time to respond!
The “Event Hour of Day” property is available on your events all the time if you just want to use that, but that’s based on the event timestamp and not your custom property of sessionCreatedAt.
Derived Properties allows you to extract your hour component from any custom ISO date /timestamp property that you are sending ( this is a paid feature ).
Alternatively, you can possibly try to use the glob match operator to match your hour pattern from the ISO date values if that’s easier.
Ok that makes sense! thanks a lot for the help
I think I have all the information needed moving forward
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. You can also create a Guest account below!
If you're a current customer, select the domain you use to sign in with Amplitude.
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. Want to sign up as a guest? Create a Community account.
If you're a current customer, select the domain you use to sign in with Amplitude.