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.
Hi
@postwick
I haven’t run into this specific issue. Could you maybe offer some simple suggestions of how you’d like us to approach and solve this issue?
Some screenshots are always helpful.
The format for a datetime argument when starting a job via Orchestator is defined in the documentation:
DateTime
- provide the value as a valid JSON, such as
"2012-04-23T18:25:43.511Z"
;
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
.
I suspect ISO_8601
@postwick
Remove the “Z” from the String or provide the timezone of your choice.
en.wikipedia.org
If no UTC relation information is given with a time representation, the time is assumed to be in local time. While it may be safe to assume local time when communicating in the same time zone, it is ambiguous when used in communicating across different time zones. Even within a single geographic time zone, some local times will be ambiguous if the region observes daylight saving time. It is usually preferable to indicate a time zone (zone designator) using the standard's notation.