Solved

Using and manipulating date time user properties

  • 20 January 2022
  • 2 replies
  • 48 views

Badge

Hi,

We’ve added a Starting date user property and it has been populated with ISO 8601 values as following: YYYY-MM-DDTHH🇲🇲ss”z”

It would seem that the values can be queried in events charts with YYYY-MM-DD manually entered values to create segments as detailed in the article below

When using a user composition chart then it’s a little more challenging and I’d like to know if it could be possible to trunc the date time and only retain either YYYY-MM-DD or even YYYY only.

The other solution we’re considering is to create separate user properties or changing its format to integer with YYYYMMDD

Any other recommendation?

Thanks!

icon

Best answer by Saish Redkar 20 January 2022, 20:10

View original

2 replies

Userlevel 7
Badge +4

Hey @BenR2 

Instead of creating separate user properties formatted to your choice, the easiest option would be to leverage the Derived Properties feature and try using their date time functions to format and create a derived property according to your use case.

However, this feature is only available to enterprise customers and customers who have purchased the Govern add-on.

Let me know if I have interpreted your use case correctly. Hope this helps.

Badge

Hey @BenR2 

Instead of creating separate user properties formatted to your choice, the easiest option would be to leverage the Derived Properties feature and try using their date time functions to format and create a derived property according to your use case.

However, this feature is only available to enterprise customers and customers who have purchased the Govern add-on.

Let me know if I have interpreted your use case correctly. Hope this helps.

Thanks a lot!

We don’t have the govern add-on and I didn’t know about that function which seems extremely powerful... If only I could do it in Segment Protocols (only let’s you rename events and properties). :rolling_eyes:

I think we should go with separate user properties, Starting year, month, day and day of week.

Reply