How to calculate the minutes between startTime and endTime

Certified Senior Developer

HI,

I am working on a daily log kind of project.

So i need to

1. Take the start time and end time and calculate the number of minutes between them.

eg. 6:15 am  to 8:15 am -> 120 minutes.

I tried using the function 

minute( todatetime(endTime)-todatetime(startTime) )

but this works only till 60 minutes. i.e. 6:15 am to 7:15 am ->0 min.  Should give 60 mins

Also

2. is there any way i can only take the time as input? I have to use a!dateTimeField() Where as i dont want to get concerned with date. 

Once the datetime is entered, i can use totime to get only the time. But i want the input itself to be time and not datetime.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data