Skip to main content
Solved

What is the right format for date in event properties

  • February 20, 2025
  • 5 replies
  • 59 views

Forum|alt.badge.img

We want to do operations for event properties of date type. For example filtering by events with date-type event property that are more than a year ago (we use such properties for date-based filters for example). 

So far were were sending data in format of “YYYY-MM-DD” and Amplitude sees it as a string and doesn’t allow comparison operations. 

What format should I use, will changing to “YYYY-MM-DDTHH:mm:ss” help? 

Thanks! 

Best answer by Saish Redkar

AFAIK, the behavior should be the same for both user and event properties ingested in date format.
The “greater than” operator should be available irrespective of the property type
 

 

View original
Did this topic help you find an answer to your question?

5 replies

Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1377 replies
  • February 20, 2025

Hi ​@Mykyta Ka 

We ingest one of our user properties in the "date": "2024-12-01" format and I’m able to compare without any issues. Can you verify from your raw event data how the format is shown?


Forum|alt.badge.img
  • Author
  • Novice
  • 3 replies
  • February 24, 2025

Thank you, note that I meant event properties here, in raw data it looks this way: 
"expiry_date": "2024-12-18"

And when I for example go to segmentation report and try to filter by properties I don’t see comparison like “greater than”, but I have hunch that actually it’s impossible to filter by property there at all. 

And maybe one should actually go to data table for that 🤔


Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1377 replies
  • Answer
  • February 24, 2025

AFAIK, the behavior should be the same for both user and event properties ingested in date format.
The “greater than” operator should be available irrespective of the property type
 

 


Forum|alt.badge.img
  • Author
  • Novice
  • 3 replies
  • February 24, 2025

Got it, so when I try to use segmentation report, I see only ability to multi-select when trying to filter by event property (see below)

Interesting where you are able to find such filter for event properties, my guess that it’s other types of reports, and maybe segmentation just has limited filtering capabilities by design
 

 


Forum|alt.badge.img
  • Author
  • Novice
  • 3 replies
  • February 24, 2025

My bad, I actually missed the comparison operator to the left of the value. Thank you for leading me in the right direction, feeling somewhat awkward for missing that! 

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings