2
Answers

How to Mannage my DateTime

Rijen Juni

Rijen Juni

9y
413
1
 I have code like this
 
Calendar calendar = CultureInfo.CurrentCulture.Calendar; int weekNo = calendar.GetWeekOfYear(DateTime.Now, CalendarWeekRule.FirstFullWeek, DayOfWeek.Tuesday); var tempResultsult = from p in db.Laporan where p.TanggalLapor.Year.ToString() = DateTime.Now.Year.ToString() && (calendar.GetWeekOfYear(p.TanggalLapor, CalendarWeekRule.FirstFullWeek, DayOfWeek.Tuesday)).ToString() = weekNo select p;
 
 
but it still error. The error message says && cant used in string, int how should i do ? 
 
Answers (2)