cancel
Showing results for 
Search instead for 
Did you mean: 

Add 5 days from Current Days inn SAP Script

AsitabhaDeb
Level 6
HI Experts,

I have copied one SAP script in code where Today date will put one field in SAP and Today+ 5days in another field.
I put in manually during SAP script run.

Can you please tell me how to put after 5 days automatically in SAP when every time I run the script in BP.

I have put Todays data as = (Today ()) , Its running smooth.
But when I am trying to add 5 days in script = AddDays (Today () 5), its giving me the error message 
"Expression is not as Array or method, It cannot be in Argument list."

I have added 1 parameter  1. "Adddays = Datetime."
If I delete this its showing " AddDays not declared"

Please help me


------------------------------
Asitabha Deb
------------------------------
5 REPLIES 5

Hi Asitabha,

Which script are you referring to? Is there a vbscript that you are changing to accommodate the date values or a VB.NET code stage?


------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

HI Shashank,

It is Vb.net script in code. SAP script always form as a VB.net I guess.
Please help me on my query.


------------------------------
Asitabha Deb
------------------------------

Hi Asitabha,

The date that you get using the calculation stage can be passed as an input to the code stage and used accordingly. Alternatively you can modify the code to calculate the date within it in which case you will have to use the VB.NET supplied classes to calculate your new date. 


------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

Hi,

Can you please help me with reference code for date which I am looking for to enter in code stage.
I have entered : AddDays(Today(), 5) but its give me above mention error message.

Please help me

------------------------------
Asitabha Deb
------------------------------

Hi,

Here is sample VB.NET code 

Dim today As Date = Date.Today
Dim newDate As Date = today.AddDays(5)

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------