I created a datetime argument, which ends up being a datetime parameter for the Process in Orchestrator. In Studio you simply enter 02/22/2022 (without quotes) and it works fine.
Orchestrator tells you that the parameter must be valid JSON. So I entered…
[“02/22/2022”]
Orchestrator took this. In the automation, I tried to use the argument in an activity’s property that requires a datetime, and when running unattended it gives this error:
Invalid format for argument ‘cfg_DefaultEffectiveDate’: Can not convert Array to DateTime.
I had the same problem so I reported in the input argument “2022/02/22”.
I used the format “yyyy/MM/dd” and it worked well, the robot understands it as a date variable.
It sounds like the issue is the format. Looks like it requires yyyy/MM/dd which is odd. At least put something on the parameter that tells us that should be the format.
Except that’s not JSON. That’s UTC format. And it would indicate that you cannot use a local time, you have to adjust. Or does it adjust automatically?
For the documentation, I’d prefer something like to following (but with a decent english)
DateTime - provide a value that will be deserialize as … such as "2012-04-23T18:25:43.511Z". Don’t forget the double-quotes. If you want to check in your workflow that a value is provided for that argument, check it against DateTime.MinValue.