Comparing two variables

Hi All,

i am just trying to compare two variables. one has integer value and comparing with today’s date.
but not working.

logic below

image

Note - first variable has integer value(8), i want to check the today’s date with the integer value.

is this expression wrong?

Hi,

Can you try as the following, if checkCurrentDate is int32?

    checkCurrentDate = Now.Day

Regards,

Hi @Rakesh_Tiwari ,
You can compare if they are same type variable

Regards,
LNV

Hi @Rakesh_Tiwari

variable1 and CheckCurrentDate is of integer datatype

1 Like

Hi @Rakesh_Tiwari

You done all good

checkCurrentDate.equals(DateTime.now.toString("dd"))

Hope it helps!!

Hi @mkankatala ,

it is going to the else part of IF.

one doubt, variable value is coming as int 8 and it comparing with today’s day which 08(System day), is that the region it is not able to match?

Okay @Rakesh_Tiwari

In that case use contains instead of equals.

Hope you understand!!

checkCurrentDate.Tostring .equals(Now.ToString(“d”))

Or

checkCurrentDate=Now.Day

1 Like

Hi All,

Thanks all for your support, i got the solution.

checkCurrentDate.Contains(DateTime.Now.Day.ToString)

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