Pedroble Posted March 11, 2013 Share Posted March 11, 2013 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. Link to comment Share on other sites More sharing options...
doughemi Posted March 11, 2013 Share Posted March 11, 2013 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. 1 Link to comment Share on other sites More sharing options...
Pedroble Posted March 14, 2013 Author Share Posted March 14, 2013 Thank you, that works very well. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 4062 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now