Hi ,
can anybody help me to get the last Monday of the previous month.
Hi ,
can anybody help me to get the last Monday of the previous month.
sure please find the code attached for reference @Shirin_Sebatina
Monday_Lastmonth.zip (1.6 KB)
Hi,
Can you try the following expression?
dateTimeVar = Enumerable.Range(-7,7).Select(Function(i) New DateTime(Today.Year,Today.Month,1).AddDays(i)).Where(Function(d) d.DayOfWeek=DayOfWeek.Monday).First()
Regards,
Hi,
Do you define variable named Today
in your variable panel?
If so, the above expression refers not Datetime.Today but your variable. For now, can you try the following?
dateTimeVar = Enumerable.Range(-7,7).Select(Function(i) New DateTime(DateTime.Today.Year,DateTime.Today.Month,1).AddDays(i)).Where(Function(d) d.DayOfWeek=DayOfWeek.Monday).First()
OR
dateTimeVar = Enumerable.Range(-7,7).Select(Function(i) New DateTime(Now.Year,Now.Month,1).AddDays(i)).Where(Function(d) d.DayOfWeek=DayOfWeek.Monday).First()
Regards,
hey did u try out my code @Shirin_Sebatina if it doesnt work let me know
yes even your code worked.
so @Shirin_Sebatina
kindly close this topic and mark any one as solution so that it will be benefitted to other forum members
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.