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

Note - first variable has integer value(8), i want to check the today’s date with the integer value.
is this expression wrong?
Yoichi
(Yoichi)
2
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
mkankatala
(Mahesh Kankatala)
5
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?
mkankatala
(Mahesh Kankatala)
7
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)
system
(system)
Closed
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.