Search code examples
iosshortcut

Create date from text in iOS Shortcuts


I want to take a string and turn it into a date but I cannot find the format how to enter the text so it is recognized as date. Please see the screenshot.

  1. asking for the date as text (this is just to try it, as actually I get the date from a text property)
  2. Convert it to date
  3. Output as formatted date -> date conversion error enter image description here

Solution

  • An answer can be found here. They key is to not use the magic variable directly in "Use date", but select "Given date" and then use the magic variable for that. This way a format can be specified.