Skip to main content
andreammelde
Helper ⭐️⭐️
May 11, 2021
New Idea

How can I compare dates between different fields to find the latest date?

  • May 11, 2021
  • 13 replies
  • 532 views

I have created a data designer dataset on Success Plans with 3 date fields: Plan Last Modified Date, Associated CTA last Modified Date, and Timeline Last Activity Date. I need to compare between the 3 fields to find the MAX date of the three columns. The idea is that this is the true “last modification” date of the plan, as we consider modifying a CTA or Timeline to also be working a plan.

 

Has anyone had success comparing dates between columns? I have the max date within the column itself figured, now need to compare between the 3

 

 

13 replies

Expert ⭐️
June 1, 2021

Hey @andreammelde I’m not sure why you are getting that error. Seems odd since all fields are date time fields in your screenshot.

 

Can you go through each union and merge and make sure all their data type icons are lining up.

Anil Raj Pujari
Helper ⭐️⭐️
June 10, 2021

We have changed this thread to feature request for better tracking.

Contributor ⭐️
April 17, 2023

The horizon rules engine Union option does not appear to work like proper sql. When trying to merge two datasets, each with one of the dates to compare, Gainsight’s Union requires you to pick which one to keep (the master), when I really want to merge the two datasets together in order to have a final transformation where I can pick the max date. When I tried not including the date field as part of the Union, but giving them the same display name, it gave an error that they couldn’t have the same name, when you give two different names, it creates two columns which is defeating the point of trying to union them. This solution is not producing the desired result. Please consider making the Union function work like it does in sql which would allow you to do this.