generate functionTue, 07 Feb 2023

listcollectionview filtering current month

public ObservableCollection<TimeEntry> FilterMonth() { string currentMonth = DateTime.Now.ToString("MMMM"); return new ObservableCollection<TimeEntry>(TimeEntries.Where(x => x.Date.ToString("MMMM") == currentMonth)); }

Questions about programming?Chat with your personal AI assistant