Skip to main content
Participant
March 2, 2020
Question

Changing date field color based on difference in month

  • March 2, 2020
  • 1 reply
  • 557 views

Hi,

I am creating a checklist with a "From Date" and an "To Date".

I have another field called "Completed Date". How do i script so that the "Completed Date" field will be filled with Red color if the difference between the "Completed Date" and the "To Date" is less than say 5 months.

I tried reading the "Working with Date and Time" guide but its too much for my understanding.

Thank you!!

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
March 2, 2020

What's the format of your date fields?

xavsgAuthor
Participant
March 2, 2020

Hi,

The format is in dd-mmm-yyyy. 

try67
Community Expert
Community Expert
March 2, 2020

OK. However, calculating the difference in months is tricky, as each month has a different length, so you need to clearly described how it should work first.