Re: Looking for some logic help with dates and working outs.
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Mon, 3 Dec 2007 23:25:06 -0600
"Kardon Coupé" <prefer.to@xxxxxxxxxxxxxxxxx> wrote in message
news:u%235ldMjNIHA.4688@xxxxxxxxxxxxxxxxxxxxxxx
Dear All,was
I'm looking for a solution to this problem...
I have some variables that hold date and time information....
Public E_Day(1 To 5000)
Public E_Month(1 To 5000)
Public E_Year(1 To 5000)
Public E_Hour(1 To 5000)
Public E_Min(1 To 5000)
Basically I'm looking for a way to basically say, if the min is at say...
54mins, and I add 15 mins to it, it goes over 60 mins, so I was going to
subtract 60 and add 1 to the hour, obviously when the hour gets to 24 I
going to subtract 24, and 1 to the day.... Now here is theproblem.....when
the day reaches, 30 or 31, or 28 for February (or even 29 for a leapto
year).....
So I'm thinking I have to look at the current month from the array, and
determine if I add one, or it is then in the next month, if that happens
fall on a February month, I'm going to have to look at the year too, andlost
somehow work out if it is a leap year, etc...
I'm starting to confuse myself with the logic behind this, and getting
in my 'if' and 'then' statements.....
Can anybody point me in the right direction, there must be an easy way of
doing this, and I'm not thinking of it....
I would probably just use an Array of Dates and VB's Date functions to
manage the changes. Then all you would have to do is use DateAdd() to manage
the changes.
-ralph
.
- Follow-Ups:
- Re: Looking for some logic help with dates and working outs.
- From: Kardon Coupé
- Re: Looking for some logic help with dates and working outs.
- References:
- Looking for some logic help with dates and working outs.
- From: Kardon Coupé
- Looking for some logic help with dates and working outs.
- Prev by Date: Re: Struggling w/ .NET web scrapper project
- Next by Date: Re: The inaugural VB6 vs dot net test
- Previous by thread: Looking for some logic help with dates and working outs.
- Next by thread: Re: Looking for some logic help with dates and working outs.
- Index(es):
Relevant Pages
|
Loading