![]() |
|
[.NET] Getting some ListBox items - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Getting some ListBox items (/showthread.php?tid=5978760) |
Getting some ListBox items - Ghostenigma - Jun 11, 2019 Hi! I have this code and some data in listbox Code Dim attlist As New List(Of List(Of DateTime))And I get this result witch is what I want https://imgur.com/a/rtpCtS7 But this code is getting results only from date 1 to 12 and is working If i add a date from 13 to 31 I get an error https://imgur.com/a/2BfgPU5[ What I have to change to get this code work if I check for each day of the month from 1-31? RE: Getting some ListBox items - HFDone - Jun 11, 2019 The month component, expressed as a value between 1 and 12 https://docs.microsoft.com/en-us/dotnet/api/system.datetime.month?view=netframework-4.8 RE: Getting some ListBox items - Ghostenigma - Jun 11, 2019 (Jun 11, 2019 09:06 AM)HFDone Wrote: The month component, expressed as a value between 1 and 12Yes but how to change that part to express the days(1-31) and not the months(1-12)?Because I've tried .Day but I still get that error RE: Getting some ListBox items - HFDone - Jun 11, 2019 https://docs.microsoft.com/en-us/dotnet/api/system.datetime.day?view=netframework-4.8 Convert.ToDateTime("11/6/2019").Day RE: Getting some ListBox items - Ghostenigma - Jun 11, 2019 (Jun 11, 2019 10:51 AM)HFDone Wrote: https://docs.microsoft.com/en-us/dotnet/api/system.datetime.day?view=netframework-4.8Yes now is working because what I was doing wrong was the format of the date...I had it like dd:mm:yyyy but after changed to mm:dd:yyyy now it works! I have another thing that I want to do To add another for cycle to get each name on the listbox any tip would be appriciated RE: Getting some ListBox items - HFDone - Jun 12, 2019 you can grab it with your code t.Split(" "c)(1) |