Hi Team,
AddDays value is dynamic it may be -1 ,-2 etc based on user request.
Everytime i cannot go to code and change
Below one will work? Ex.“Predate” is the -1 value we get from asset
String.Format(DateTime.Now.AddDays({0}).ToString(“dd”),PreDate)
The erorr for the above expression is 1 dimentional integer array cannot be converted to double
Please let me know the solution
Thanks in advance
Likitha
1 Like
You could try the following:
(remember to change the type of the variable keeping the asset value to integer).
DateTime.Now.AddDays(PreDate).ToString("dd")
Hi
Hope the below steps would help you resolve this
Create an asset of type integer and mention the value as -1 and get that in studio with Get asset activity and save as int_Asset_days which is of type integer
Now in studio you can directly mention like this with your expression without using String.Format method
Datetime.Now.AddDays(int_Asset_days).ToString(“dd”)
Cheers @vinjam_likitha
system
(system)
Closed
September 7, 2023, 8:24am
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.