Solved

Filtering on calculated difference between two dates


Userlevel 2

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

 

icon

Best answer by meganfriesen37 21 May 2024, 22:59

View original

3 replies

Userlevel 7
Badge +10

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

 

Userlevel 7
Badge +10

See this post for more info: 

 

Userlevel 2

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

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved