Jump to content
Server Maintenance This Week. ×

Change colour with date range


This topic is 4062 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

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.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.