Datetime arguments/parameters don't work correctly

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.

1 Like

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.

1 Like

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.

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.

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" ;

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.

I suspect ISO_8601

@postwick

Remove the “Z” from the String or provide the timezone of your choice.