3 Replies Latest reply on May 14, 2011 8:53 AM by FraserH

    Using the If command with a date

    FraserH

      Title

      Using the If command with a date

      Post

      I am very new to scripting adn am hitting a wall with this hopefully someone can help

      I have  afield caled contract_expiry  which is a date field

      I want the contract_status field to have a value of 1  if the contract expiry_date  is before today

      I want the contract_status field to have a valkue of 0 if the contract_expiry date is after today

      the syntax I have tried is

      If (Contract_Expiry > Date ( day ; month ; year ) ;"1" ;"0")  but I get the message that the Date field cannot be found

      I have reversed the day  month ; year order as I am in the uk;

      Any help to resolve this would be much appreciated