07-14-2009 09:33 PM
well I am trying to figure out an old project I was working on.
the point is to update the system everytime you submit.
so say:
you hit submit and this line is added to the array:
current Time: expired time:
7/14/09 10:00:00 7/15/09 10:00:00
and than I hit submit again a couple of days later:
current time: expired time:
7/20/09 3:00:00 7/21/09 3:00:00
I hope this helps you understand
thank you,
07-14-2009 11:01 PM
Your method was using initialize array to create ever growing arrays of the same value.
See attached. This adds a new time to the end of each array.
07-15-2009 08:19 AM
yes that is the idea, but I need to be able to add months or hours or days right now all it adds is one day I figure I can put three controls months, days, hours and connect them to a merg so it knows how much to add to get the correct expiration time.
07-15-2009 09:17 AM
See attached.
If you were just adding hours or days, you could easily do the math to add the correct amount of seconds. But since a month has a variable number of days, then the date record will work for you, but you have to start with the current date, not a date record full of zeroes.
07-15-2009 10:23 AM
I see that, but the problem is that it needs to keep updating every index of the arrays:
exp:
say that this is the arrays:
current Time expiration time:
7/15/2009 10:00:00 7/16/2009 11:00:00
7/15/2009 7:00:00 7/16/2009 8:00:00
7/15/2009 2:00:00 7/16/2009 3:00:00
7/15/2009 3:00:00 7/16/2009 4:00:00
7/15/2009 1:00:00 7/16/2009 2:00:00
7/15/2009 8:00:00 7/16/2009 9:00:00
when I hit the submit button say tomorrw at 7:00:00 the array will read:
current Time expiration time:
7/16/2009 7:00:00 7/17/2009 8:00:00
7/16/2009 7:00:00 7/17/2009 8:00:00
7/16/2009 7:00:00 7/17/2009 8:00:00
7/16/2009 7:00:00 7/17/2009 8:00:00
7/16/2009 7:00:00 7/17/2009 8:00:00
7/16/2009 7:00:00 7/17/2009 8:00:00
so it would update all of the array. so it stays at 1 day, 1 hour, 0 months
thank you,
07-15-2009 12:12 PM
07-15-2009 01:26 PM
well current time comes from the current time so what ever the time may be the next set of arrays would update according to the current time arrays loke I was saying if I put in 0 months, 0 days, 1 hour the array should update both sets of arrays every time I hit the submit button like in the first vi I sent evere time you hit the submit button the first set of arrays update properly it is the second set of arrays I am having problems with it needs to update just as the first set of arrays update.
I hope this is a better explanation I am sorry if it is hard to understand.
07-15-2009 02:47 PM
07-15-2009 03:03 PM
this is correct other than I do need to be able to add to it.
in other words the size of the array is not constant I still need to add to the array.
exp:
I hit the submit button:
current time: expired Time:
7/15/2009 3:57:00 7/15/2009 4:57:00
then I hit enter again a day later:
current time: expired Time:
7/16/2009 5:00:00 7/16/2009 4:57:00 // this is from the previous day
7/16/2009 5:00:00 7/17/2009 7:00:00 // this is the new item added to the array's
07-15-2009 03:16 PM