Hello Everyone, Hope you are doing good
I would like to present this post who are looking for the expressions related to the Date Expression
Get the Week Count
W"+System.Globalization.CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(Today,System.Globalization.CalendarWeekRule.FirstDay,DayOfWeek.Monday).ToString
Get the 5 Business days count
Enumerable.Range(0, new DateTime(2023,12,31).DayOfYear + 1).Select(Function (x) New DateTime(2023,1,1).AddDays(x)).Where(Function (x) Not (x.DayOfWeek = 0 OrElse x.DayOfWeek = 6 )).Count
Count of Completed Day (Monday)
System.Globalization.CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(Today.AddDays(-7),System.Globalization.CalendarWeekRule.FirstDay,DayOfWeek.Monday)
Get the previous month last Date of Monday
Enumerable.Range(-7,7).Select(Function(i) New DateTime(Today.Year,Today.Month,1).AddDays(i)).Where(Function(d) d.DayOfWeek=DayOfWeek.Monday).First()
Hope this will be helpful
Questions
For questions on your retrieval case open a new topic and get individual support
Feedback
Click button to share your thoughts
Regards
Gokul