March 11, 201312 yr I would be grateful if someone could help me with this calculation for Conditional Formatting. I have a birth control portal that gives the next birth date according to the last service. I would like the birth date to change colour with the proximity of the event. For days > or < my formula works but not for a range of dates eg 255-269 days If (Birth control_HEATS::HEAT = "LAST" and GetAsNumber(Get(CurrentDate)) - GetAsNumber(Birth control_HEATS::SERV_date) = 255-269 ; 1 ; 0 ) I have tried using 255...269 and 255..269 but not accepted.
March 11, 201312 yr Solution If (Birth control_HEATS::HEAT = "LAST" and (Get(CurrentDate)) - (Birth control_HEATS::SERV_date) ≥ 255 and (Get(CurrentDate)) - (Birth control_HEATS::SERV_date) ≤ 269 ; 1 ; 0 ) The GetAsNumber() function is not needed. Internally, dates are already numbers. Dates are stored as the number of days since Jan 1, 0001.
Create an account or sign in to comment