I could really use some insight on this calculation. I should convert this to a number or something instead... :
{if str(DOCUMENT.COLONNXTDUE) < str(._TODAYSDATE) then USEROK("Please enter future date!") and OBSNOW("COLONNXTDUE","") else OBSNOW("COLONNXTDUE",DOCUMENT.COLONNXTDUE) endif}
My results are concerning. if todays date is 04/24/2015
For example - if a user enters 04/01/2015 then USEROK
if a user enters 05/01/2016 then OBSNOW("COLONNEXTDUE") = 05/01/2016
HOWEVER if a user enters 04/01/2017 then USEROK.
should I be using val() ?
Thanks in advance!
Use DURATIONDAYS(str(DOCUMENT.COLONNXTDUE) ,str(._TODAYSDATE) )>0
To determine the relationship between two dates, use the function DurationDays(date1,date2). The dates are in the format "mm/dd/yyyy". The function returns the difference date2-date1 in days.