Skip to main content
Answer

Filtering on calculated difference between two dates

  • May 21, 2024
  • 3 replies
  • 80 views

We have created a generic inquiry which calculates the difference between the last user password change date and today() to get a number. This works.

We now want to use that number to filter the records.

e.g daysSincePWChange is greater than 0.

 

The filter works if we use EQUAL or STARTS WITH and a given number, which means the result is being treated as a string. 

What can we do to ensure the calculated results are treated as numbers?

 

Regards

 

Best answer by meganfriesen37

See this post for more info: 

 

3 replies

meganfriesen37
Captain II
Forum|alt.badge.img+12

Use one of the conversion formulas to change your count of days from a string to either Integer (whole number) or Decimal

 


meganfriesen37
Captain II
Forum|alt.badge.img+12

See this post for more info: 

 


  • Author
  • Freshman II
  • May 21, 2024

This is the best answer - the trick is to use the schema field which forces the evaluated result to the correct field type.