roattw Posted April 23, 2020 Report Share Posted April 23, 2020 I have looked at the posts on this topic using a Yes/No field. But would be possible to do it with DATEDIFF? I have two simple fields. A submit_date (timestamp) and a deadline_date (text field as calendar popup). The app requires a minimum of 30 days to complete a request. So if someone submits a request (submit_date) and chooses a deadline date (Deadline) that does not meet then 30 day minimum notice we need that Deadline date text to be read preferrably (or the field background, or row). Ive tried versions of this: <div =id="visi [@field:Deadline]"> <script> var isi = document.getElementById("visi[@field:Deadline]"); if DATEDIFF(day, [@field:Sub_date], [@field:Deadline]) <= 29 { isi.parentNode.parentNode.style.backgroundColor = '#FFFFFF'; } else{ isi.parentNode.parentNode.style.backgroundColor = '#66699'; } </script> </div> and CASE WHEN ATEDIFF(day, [@field:Sub_date], [@field:Deadline]) <= 29 THEN '<span style="color:red;">'[@field:Deadline]'</span>' ELSE '<span style="color:#blue;">'[@field:Deadline]'</span>' END Quote Link to comment Share on other sites More sharing options...
BenjaminS Posted July 23, 2023 Report Share Posted July 23, 2023 Anyone solved this? Quote Link to comment Share on other sites More sharing options...
Volomeister Posted July 24, 2023 Report Share Posted July 24, 2023 I believe the answer is in this thread: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.