|
-
Jul 25th, 2001, 10:31 PM
#3
Thread Starter
Frenzied Member
ok
i could SWEAR it wasnt working
now it does
hmm
i will figure out whats going on
the come back
he he
do you like writing code for people serge?
if you do, i need some help he he
given
const STARTDATE = "01/01/1995"
EndDate = format(now, "mm/dd/yyyy")
so basically given a constatn start date
and todays date
i would like to populate a Treeview object as follow
since 1995 is the start year
i want it to start off with
Code:
1995
Jan
1
2
3
...(last day of that month for that year)
Feb
(same as above)
March (same as above
1996 (same as above)
......
2001 (same as above)
however, since 2001 is not complete, i dont want all the 12 months to be listed, and since today is let say 25th, i dont want no dates to be listed after july 25th
so the last date should be what EndDate is (logical)
i know how to do this
but i believe how i am doing this is not effecient so i am looking for a better solution
here is how i am doing it
sending in 2 dates into a class object
then the class object figures out how many years there is in between (inclusive) the 2 dates
and lists them (i will need this for the treeviews top nodes)
but it gets tricky when comes to the months
and how many days each of those months contain for that perticular year, i was gonna use a 2D array for month and what year they are, then i was gonna use a 3D array for day, month and year
after thinking about this, the code would get ugly
so i was hoping someone has a better solution
or have time that they would like to help me out to do this (ya am asking you to write the code for me IF you like)
attached is what i have done so far
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|