Skip to main content
Solved

How to truncate datetime User property to the date format?

  • December 14, 2023
  • 1 reply
  • 329 views

Forum|alt.badge.img+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?

Best answer by Saish Redkar

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.

 

 

 

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

1 reply

Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1380 replies
  • Answer
  • December 14, 2023

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


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