Solved

How to truncate datetime User property to the date format?

  • 14 December 2023
  • 1 reply
  • 95 views

Badge +1

Hello, team. We have a user property (‘Install at’) in the format of date and time. Is it possible to truncate it to the date if we have the Growth plan but no Govern add-on?  I am able to create a new user property, but I am not able to add any formula to it. This new property has the status 'Planned.

Also in the next steps I want to calculate the date diff between today and that install date, to know the LT of the user, is it possible?

icon

Best answer by Saish Redkar 14 December 2023, 19:50

View original

1 reply

Userlevel 7
Badge +10

Hi @Aleksandra Kurysheva 

Without the derived properties feature ( part of Govern Add-on ), it won’t be easy to split and truncate the user property value to display just the date part.

When you create a new user property, Amplitude will expect you to send that new property with events and move it from the planned phase.

So in absence of derived props, you will have instrument the date property as a new user property.

For your 2nd use case, you’ll again need derived props for calculation using the available date functions as shown in this post

 

Afaik, there isn’t much that can be done in absence of derived props apart from sending the desired calculations as additional custom user properties.

If your secondary use case is aggregating a set of users who joined between certain dates as isolated segments, then using either glob match / contains or <,> operators on your date time property will help to some extent.

Hope this helps.

 

 

 

Reply