Help with calculating time

Hey guys,

I’m having a few problems formulating a shortcut and I’d be grateful for the input of others.

The issue:
I’d like to build a shortcut to generate a block of text I need for work. Basically, I work in the public sector and I have to use a special form of words in my invoices to get paid (is the best way of describing it).

I can cut and paste the text into Word (which is fine) but it requires me to manually go through and change the times each time, which is a pain.

So I’d like to reduce it to a shortcut that helps me calculate the time spent based on my inputs.

So, there is a start time and an end time. Nice and easy.

Start: 09.00
End: 11.45

Now I can use the shortcut to work out the time between the two and have that variable copied to the clipboard, so the final version reads:

Start: 09.00
End: 11.45
Total time: 2 hours 45 minutes

The issue arises if I have a break in the day. As I don’t get paid for the break.

So, imagine I work from 09.00 to 15.00, but with an hour for lunch between 13.00 and 14.00.

How do I calculate that break and subtract it from the total time spent?

Guidance greatly received!!

sorry @DIYerUK if this is a little late replying but i have only just joined this group recently due to Reddit r/shortcuts being offline and come across this post.

however i too have the need to work out time for time worked and also to remove my break. My break is however variable depending on the number of hours i am clocked in for

this shortcut uses entries in your specified calendar called “Clock In-” and “Clock out-” and then uses the time between them to calculate the time worked and also removes and calculates the paid time and the time of your break
hope you can use this , if you have not already found a solution to your problem

https://www.icloud.com/shortcuts/525ec85267ab4e5db9f78e3ed04483d2

1 Like