What is the simplest way to get the current week of year ?
@vamsikrish28
Not sure what in detail you are looking for as the “current week” can be interpretated in more definitions (Week Number, Date Interval…)
Have a look on following, ensure System.Globalization is imported to the namespaces (right to Variable pannel)
CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(DateTime.Now, CalendarWeekRule.FirstDay,DayOfWeek.Monday)
I want to compute the current week number of current year.
There might be 52 or 53 weeks in a year right, so I want which week(week number) we are currently in!!
this should be possible with the code line from above. Have a look also on the reference link for further configuration / Paramter info
Thanks a lot @ppr. Cheers and happy coding
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.