Compare 2 dates from a list

Hello. I am trying to compare a date from a list with todays date to see how many days apart they are. Ideally I would like to find the dates that are less than a week apart. Here is what I have but i get an error which looks like all the dates are being populated from the list into the end date.

the 6/13/2022 is just a test date. I could probably move the get todaysdate into that spot. I just can't get the duration to work properly. I would like it to create a notifier when it finds the date in the list.

Thanks for any help

mark

Try this way, duration returns the milliseconds between instants

Make instant returns an instant in time specified by MM/dd/YYYY hh:mm:ss or MM/dd/YYYY or hh:mm.

Hi thank you that worked. it shows how many days till a certain date. I think in need to go the opposite way. I need to search the list and find the dates that will expire in 5 days from todays date. for example say the end date is set for 3/18/2022 and todays date is 3/13/2022. I want to be able to send a notify box saying 1 item will expire in 5 days. i assume the list? thing is where the change needs to be made? or is their and easier way? Here is what I modified so far

the label1.text is just there so i can see what it is doing. I will be removed

Something like this maybe

Or something like this: dateList.aia (5.3 KB)

3 Likes

Hi thank you dora and anke I got it working with your help :smiley:

1 Like