I want to take an input of a Date data item and subtract that date from the current date, NOW, to calculate how many years are in between those dates? Does NW have that capability to be able to figure out how many days or years are in between a date?
For example, if I have June 8, 2020 and I want to compare it to today’s Date October 9, 2025 and figure out how many years are between them (5) does NextWorld have that capability?
The Subtract logic block action can do this. While Date Math and DateTime Math sound like fitting options, their purpose is to adjust date and date time fields by a duration, not determine the difference between two values.
By using the Subtract logic block action, you can input a field to subtract from - call it EndDate (DateTime or Date) and a field to subtract - call it StartDate (DateTime or Date). If you output to a field or variable of type Time, the output will be a duration.
When using Date fields, this duration will be a clean number of days. When using DateTime fields, this will calculate to the millisecond by default but can be rounded or displayed with less precision as desired.