Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am trying to calculate Records by comparing Today is Greater than (Less Than) a due date. this is what I have, but Im getting errors.
Any suggestions?
if(Today()) > [Calculated Eval Due], 'Overdue', 'OnTime' as EVAL_ONTIME;
try
if(Today() > [Calculated Eval Due], 'Overdue', 'OnTime') as EVAL_ONTIME;
Check your syntax:
if(Today() > [Calculated Eval Due], 'Overdue', 'OnTime') as EVAL_ONTIME;
should look like that, moved the ) from today to end of if statement
Hi Leo
you to need to close your if statement:
if(Today()) > [Calculated Eval Due], 'Overdue', 'OnTime') as EVAL_ONTIME;
Can you check that [Calculated Eval Due] is a correctly formatted date?
The simplest way is to add the field to a listbox and see if the values are shown as dates or numbers, and whether the data is left or right justified.
If shown as a date, but right justified, the value is correctly held as a dual field and will match the data returned by today()
If shown as a date but left justified, then the value is held as text and you will need to use something like
Date(date#([Calculated Eval Due], 'DD/MM/YYYY'))
replacing DD/MM/YYYY with your actual date format to convert the data to a correct date value.
If shown as a number then date([Calculated Eval Due]) should convert the data to a correct date format.
Thanks guys,
I appreciate it, but it looks like the comma between [Calculated Eval Due] and 'Overdue' is the hangup.
if(Today()) > [Calculated Eval Due], 'Overdue', 'OnTime') as EVAL_ONTIME;
I apologize for the newbie question but this is stumping me.
thanks,
-L
try
if(Today() > [Calculated Eval Due], 'Overdue', 'OnTime') as EVAL_ONTIME;
that did it,
thanks everyone.