Hi all,
My doubt is I need to check if it is 1st Jan and give a condition like if 1st Jan then click date as 31st December and year previous year.
How to check this and give condition.
Please help me, thanks in advance
Hi all,
My doubt is I need to check if it is 1st Jan and give a condition like if 1st Jan then click date as 31st December and year previous year.
How to check this and give condition.
Please help me, thanks in advance
If Now.Day = 1 and Now.Month = 1
So if today is first day of first month, it assigns mydate to the previous date.
What is your complete date format?
If you have the date then date.Adddays(-1) will take care of everything together
Cheers
You can do it like this:
1 - If activity → strDate.Day = 1 and strDate.Month = 1
2 - Then branch → strDate = strDate.AddDays(-1)
3 - Else branch → nothing
Note: strDate as to be defined as “Now”.
Try this
currentDate
Now
currentDate.Month = 1 And currentDate.Day = 1
previousYear
currentDate.Year - 1
targetDate
New DateTime(previousYear, 12, 31)
I hope it helps!!