How to fetch the previous month and year
Consider we have condition
if (currentdate < previous date)
{
print (yyyy/mm)
}
Ex: If (01-05-2021< 30-04-2021)
{
print (2021/04)
}
How to fetch the previous month and year
Consider we have condition
if (currentdate < previous date)
{
print (yyyy/mm)
}
Ex: If (01-05-2021< 30-04-2021)
{
print (2021/04)
}
Please find the below method,
if(now.ToString(“ddMMyyyy”)>now.AddDays(-1).ToString(“ddMMyyyy”))
{
write Line: now.AddDay(-1).ToString(“yyyy/MM”)
}
Feel free to reach us at any time if you have doubts. Thanks.
Happy Automation
@chaithanya_kumar_M
The condition is wrong, it should be
Now > Now.AddDays(-1)
Use the below Activity to get the previous month or year date
Hi @vignesh.ks
Thanks for the support it works as expected but what ever the out put comes from writline am able to see in message box this is also perfect.
But this value am not able to pass inside my URL when i pass output it is taking empty value
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.