Error in getting the current date from Orchestrator asset

Hi @Sathanand

It does not work like this.

Assets can store Text, Integer, Bool and Credential types.

You are trying to evaluate a .NET code from the asset.

What you can do is set the date value like 2021-05-26 and in your code if the asset contains value you convert it to a date object using DateTime.Parse(yourAssetValue), otherwise, if the asset has a blank value, then you use DateTime.Now (hard-coded).

1 Like