Siri shortcut: Getting the time, run action if later then 22:00, run another before 22:00?

Hi, I want to make a Siri Shortcut that checks a web site. The content is changed in the evening but the URL is easy to parse with only the date changing at the end. That part I have done. BUT, if I run the shortcut in the morning, I want it to be the current date, and if I run it late in the evening I want it set the next day. Its a workout site which is updated daily. I can get the time, but I don’t know how to compare it with 22:00.
Thanks for any advice!

You can use a custom date format to do this.

Here’s a start, you should be able to use this and just fill in your own actions.

Just realized I used “HH” out of habit (for zero padding, e.g. “08” instead of just “8”) but just “H” makes more sense here.

1 Like

Thanks @martijnengler, I had figured that part also, what I don’t get is when I calculate the date, it gives me a number for the month that has nothing to do with anything. I have to format the date as mm-dd-yyyy. When I run the shortcut, it gives me something like 58-25-2018, which makes no sense. I tried to get the date a second time and modify that date with the Adjust date, then use a magic variable from Adjusted date in custom format. So it’s something with the adjust date that messes my date, but I don’t know what exactly.

mm is the minutes. MM is the month.

For reference, here’s the complete overview:

Good catch @sylumer, I thought the MMM was for the first 3 letters, but didn’t think about the upper case vs lower case.

It now works, thanks guys!

Thanks for the shortcut!
But in my phone(iOS14), the menu in “script” - “If” - “Formatted Date” only has options like “Is” “Not include” “Start With”, it doesn’t have “Smaller than” or “Larger than”.
I downloaded your shortcut and it says “Smaller than” but I clicked it the options still have no “Smaller than”, I wonder how you input that into it, or is it the limit of the newer iOS?
Thanks again!

You will have to set the formatting of the date to ‘number’, since the default is set to as ‘text’.

It does the trick, thanks!