First:
In the 24 hour system you will never have a 24. It only goes to 23:59:59 then 00:00:00.
So you don't need the if statement.
Next:
It looks like your dates are comming in in order. I would make my array hold date and count. Then when new date comes in remove the seconds and minutes and compare it to the last date entered. If they are the same increment the count. Otherwise add the new date to the array.
Ya, U are right. Now i already simplify my coding to the format below:
I need to allocate the 24-hour time selected by the user to an array of size 24, for example, If the user choose 2day 8AM until tomorrow 7AM, Then my idea is:
hourarray(0)=8AM
hourarray(1)=9AM.....
..hourarray(23)=7AM...
How can i loop it? Thanks
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
Offline 60 posts
since Sep 2007