Multiple Assign Date Time Error

I checked the variable type and it’s “System.DateTime” for 2 of the variables but it shows this validation error. What might have gone wrong?

I think you should try Now.ToString(“format of date”)

Okay, but here I want to add 12 days from the current date so the expression is like
DateTime.Now.AddDays(12).ToString(“dd/MM/yyyy”)

Hi @Anirudh_Tugawe

In Assign - “str_todaydate” give Now.ToString

Can you show your variable panel?

Hello Manii I did the change but no use, it still shows the same error

Show me your variable panel

You can have a look

could you share the full assign for int_AddDays?

image

Change Variable -“int_salary” Datatype from String to int32
and also change variable - “int_AddDays” DataType from Datetime to String
Finally Assign int_AddDays = Now.AddDays(12).ToString(“dd/MM/yyyy”)
I think it will work…

Hi @Anirudh_Tugawe

int_date and str_todaydate is of Data Type System.DateTime and try assigning in the below way:

int_date = DateTime.Now.ToString
str_todaydate = DateTime.Now.ToString

int_AddDays is of DataType System.String and assign in the below way:

Eg:- int_AddDays = DateTime.Now.AddDays(2).ToString()         

If still issue persists get back.

Hope it helps!!

did the same but n9 change in error.

DateTime.Now.AddDays(12).ToString(“dd/MM/yyyy”)

Changed all the Data Types to String and It Worked.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.