Skip to main content

I need to find the difference between two date & time fields , and if its difference is greater than 10 minutes, a text box should be shown ,otherwise hide textbox.

So I created a list with two fields - Incident_started - with date & time  type

                                                       Shutdown_Initiated -  same type

And created a form with two tabs .And connected date fields in form to the list

209047_pastedImage_1.png

for comment section wrote a condition

209061_pastedImage_3.png

 do i need to store the difference in another column in the list ? please help me in writing the condition for comment section.

Thanks in advance

I did this using a calculated value control to get the difference in minutes with this expression:

dateDiffMinutes(DateOfIncident,DateOfShutdown)

I called the calculated value control "DateDiffMins"

I then added a formatting rule on comments box with condition:

lessThan(DateDiffMins,10)


for rule there is sufficient formula like

dateDiffMinutes(Date_Incident,Shutdown_Initiated)<10

make sure Date_incident and Shutdown_Initiated refers to named controls and not item properties.


Reply