How to find difference between two fields Date and Time (start and End) fields ?

RAM75
Tera Contributor

How to find difference between two fields Date and Time (start and End) fields ?

 

Scenario:

  1. Add two fields  on Catalog item , Fields Name: 1. Start Date and time (Data type: Date and time) 2. End Date and Time (Data type: Date and time).

 2 .Start date should not be more than 30 minutes from current time .

3.  There should not be less than  difference of 60 minutes between start date and end date .

 

Please help me on this.

Thanks

1 REPLY 1

Dnyaneshwaree
Mega Sage

Hello @RAM75 ,

You need to get value of current time and then need to add condition that Start date and time should < than 30 minutes from current time . and start date -end date <60 min like that. Refer images and update it according to your req.

Dnyaneshwaree_0-1718803212205.pngDnyaneshwaree_1-1718803294983.png


Please accept my solution if it works for you and thumps up to mark it as helpful.

Thank you!!



Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!

Dnyaneshwaree Satpute
Tera Guru