Re: Hours

From: Geoff Jones (geoff_at_NODAMNSPAM.com)
Date: 07/14/04


Date: Wed, 14 Jul 2004 18:35:20 +0100

That helps a lot. Thanks Jay

As you can gather, I'm very new to programming. Your help and others is
invaluable during my steep learning curve.

One question that occurs to me now how to tell the ListArray what values I
need to store. I know for an array this can be done as:

Dim x() As Integer

However, and forgive me if this is wrong, I set up an array of an ListArray
by

Dim y() As ListArray

but that doesn't say if it holds strings, doubles or integers etc.

Can you help?

Geoff

"Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP@msn.com> wrote in message
news:uzRAaScaEHA.3716@TK2MSFTNGP11.phx.gbl...
> Geoff,
> I would use an array of arrays or an array of ArrayLists.
>
> I would expect index 0 be from midnight to 1:00?
>
> Then you can simply use the hour of the Time (DateTime.Hour) as your
index,
> and use ArrayList.Add to add the time to that row...
>
> Hope this helps
> Jay
>
> "Geoff Jones" <geoff@NODAMNSPAM.com> wrote in message
> news:40f55807$0$294$cc9e4d1f@news.dial.pipex.com...
> > Hi Jay
> >
> > VB has been put on hold for now. I'm trying to work on some C# now (oh
> joy!)
> > LOL
> >
> > Sorry I didn't make the original post very clear. Suppose I have a list
of
> > dates as follows:
> >
> > 15:02, 09:23, 14:34, 17:02, 15:45, etc.
> >
> > These would be in order i.e. each one would have its own unique
identifier
> > in terms of order e.g. 15:02 is 1, 09:23 is 2 etc.
> >
> > I'd like to be able to create an array that would, for example, have:
> >
> > index 0 having all the items in the list with times from 01:00 to 02:00
> (but
> > not including)
> > index 1 having all the items in the list with times from from 02:00 to
> 03:00
> > (but not including)
> >
> > etc.
> >
> > Interested in hearing your thoughts
> >
> > Geoff
> >
> > "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP@msn.com> wrote in
message
> > news:eBIDljbaEHA.1656@TK2MSFTNGP09.phx.gbl...
> > > Geoff,
> > > Just out of curiosity, why have you moved to the
> > > microsoft.public.dotnet.languages.csharp newsgroup?
> > >
> > > Do you really want this part in csharp or would you like VB.NET like
the
> > > rest has been?
> > >
> > > Can you define a little better what "all the times between" means? Do
> you
> > > mean all the DataRows that fall within that time frame or ever minute
> > > (outside of the rows) that falls within that range?
> > >
> > > Just curious
> > > Jay
> > >
> > > "Geoff Jones" <geoff@NODAMNSPAM.com> wrote in message
> > > news:40f55261$0$321$cc9e4d1f@news.dial.pipex.com...
> > > > Hi
> > > >
> > > > I'm hoping that somebody can help me with the following question.
> > > >
> > > > I have a DataView which contains a column which contains a Time.
> > > >
> > > > I would like to create an array which will store the times within
one
> > > hour.
> > > > For example, all the times between 12:00 and 13:00 will be placed in
> one
> > > > index of the array, all the calls from 13:00 to 14:00 will be placed
> in
> > > the
> > > > next.
> > > >
> > > > Can anybody give me some code to do this?
> > > >
> > > > Thanks in advance
> > > >
> > > > Geoff
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: An array of rows
    ... Many thanks Jay for your help. ... Geoff ... an Array has no special powers. ... >> Dim aRows As DataRow() myNewTable.Select ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Hours
    ... I forgot to mention you need to initialize each element of your array as ... ArrayList is a reference type. ... >> Geoff, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Hours
    ... Thanks Jay ... I know for an array this can be done as: ... > Dim yAs ListArray ... >> Geoff, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Hours
    ... I would use an array of arrays or an array of ArrayLists. ... > Hi Jay ... >> Geoff, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Search all the characters then get range for some of them
    ... OK, Jay and Doug, I mis-understood your solutions. ... to know the positions of each word in a document so we can gray it out later ... array, but loading an array with the list of words that you need to search ... Dim WordsToFind As Variant ...
    (microsoft.public.word.vba.general)