Adjusting a diary date in Siri Shortcuts

Adjusting a diary date in Siri Shortcuts

I would be grateful if somebody could help me with the following.

I have created a shortcut which allows me to create a diary event, which the Shortcut asks for, which is at a set time on a date that is also requested.

The event always takes place at 10 pm on the date that is input by the user. I then want to advance the date and time by 10 hours and then create the same diary event for 8am the next day.

I’m clearly making a mistake because when I run the shortcut it normally creates the event on the present date rather than on the date that is input.

Here is a link to the shortcut:

Any help would be much appreciated. :slight_smile: Thanks, Brian

You’re referencing something that doesn’t exist. Notice how “Dates” is showing in red? That’s an error, and when you select one of them you can see it says that the variable isn’t accessible. presumably it should be relinked to the previous step which you can see is isolated (no link line).

As an aside you might want to consider utilising variables instead of the clipboard for internal data re-use.

This is possibly a personal preference ingrained from development work and data types, but the calendar action for adjusting the date is working on a date data item. However, the previous item is a calendar event and has both a start and end date/time. I would recommend switching the data type to a calendar event and specifically referencing the dates for adjustment, and then applying them to the second calendar event. That way you know exactly what date/times you are working with. In this particular case any date from the calendar event would be the same so I don’t think it would make any difference for this, hence my reference to a personal preference, but if there is any chance it could be used as the basis for something cross dates in the future, then I would definitely look at changing it.

Thank you very much for doing this for me. :slight_smile:

Your suggestion has fixed it and I have it running properly. Thank you so much for your guidance.