Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Search listview for dates within a range

Hi,
I'm really stuck and I've been trying what seems like forever to search a listview by date (dd/mm/yy) to grab rows of data and move certain columns to a listview2.

Can anyone help?

Thanks
So you want to get listviewitems that hold a certain datetime value to be moved to another listview?

If so, just loop over the listview items, and apply a condition.
(May 18, 2017 06:52 AM)Ninja Wrote:  So you want to get listviewitems that hold a certain datetime value to be moved to another listview?

If so, just loop over the listview items, and apply a condition.

I want to get any dates in a listview that are within a range of two dates entered by the user. If the a date is within the two dates then it will grab other records on that row and move them too a listview2
(May 18, 2017 07:01 AM)PriorityNew Wrote:  I want to get any dates in a listview that are within a range of two dates entered by the user. If the a date is within the two dates then it will grab other records on that row and move them too a listview2

Familiarize yourself with foreach loops.
Forget the word "listview" if you are programming. Listview is GUI it is for users only. You have to think about the databinding of the listview. The question is, is it binded with a datatable, with a list (of t) or something else. If the listview is not binded, then cast it to a list, sort the list (by date), filter the list (with the dates), bind the list with the listview2.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by tcshDec 27, 2018 09:55 PM 9 339 Dec 27, 2018 09:55 PM
Last Post: FriendZone
[C#] by severosMay 3, 2018 07:07 AM 8 264 May 3, 2018 07:07 AM
Last Post: ppaida
[C#] by wanbetaalerOct 19, 2017 11:32 AM 10 334 Oct 19, 2017 11:32 AM
Last Post: wanbetaaler