Thanks Anthony I was just this moring looking over your scripts, I did one that give me the start and end monthy will even give me an array or the months with in the rep set month "IF IN THE SAME YEAR between" Sample of where I am at so far kinda make my wounder why WItango doesn't have and @month like @days
<pre> <FORM METHOD="POST" ACTION="<@APPFILE>?_function=list"> <TABLE BORDER=0> <TR VALIGN=TOP ALIGN=LEFT> <TD> Matched date: </TD> <TD> <INPUT NAME="matcheddate1" TYPE=TEXT SIZE=10 MAXLENGTH=10 VALUE=""> </TD> </TR> <TR VALIGN=TOP ALIGN=LEFT> <TD> Matched date 1: </TD> <TD> <INPUT NAME="matcheddate2" TYPE=TEXT SIZE=10 MAXLENGTH=10 VALUE=""> </TD> </TR> </TABLE> <INPUT TYPE=SUBMIT VALUE="Find"> <INPUT TYPE=RESET VALUE="Reset Values"> </FORM> </center> <@ASSIGN local$getstartdate <@CALC "(<@ARG matcheddate2 format='datetime:%m'>-<@ARG matcheddate1 format='datetime:%m'>)+1">> <@ASSIGN local$getstartyear <@CALC "(<@ARG matcheddate2 format='datetime:%Y'>-<@ARG matcheddate1 format='datetime:%Y'>)">> <@ARG matcheddate2 format='datetime:%Y'>-<@ARG matcheddate1 format='datetime:%Y'> <@assign local$monthDays <@array value='31,28,31,30,31,30,31,31,30,31,30,31;'>> <@if expr='<@CURRENTDATE format="datetime:%Y">%4=0' true='<@assign local$monthDays[1,2] 29>'> <@FOR start=<@ARG matcheddate1 format='datetime:%m'> stop=<@CALC <@ARG matcheddate2 format='datetime:%m'>+(12*@@local$getstartyear)>> <@ADDROWS local$getdates "<@CURROW>/01/<@ARG matcheddate1 format='datetime:%Y'>"> <@ADDROWS local$getdates2 "<@CURROW>/<@VAR monthDays[1,<@CURROW>]>/<@ARG matcheddate1 format='datetime:%Y'>"> </pre> -----Original Message----- From: [EMAIL PROTECTED] [mailto:owner-witango-talk@;witango.com] On Behalf Of Anthony M. Humphreys Sent: Sunday, November 03, 2002 12:12 PM To: Multiple recipients of list witango-talk Subject: Re: Witango-Talk: date script It looks like you are trying to calculate the first and last day of a moth in a given year. Take a look at the attached (commented) TML file for this algorithm, and let me know if this helps. As for the ranges: You already know that there are 12 months in a year, you can loop through the year(s), and inside the years loop, you can then loop through the month(s) calculating the start/end days of each of the months. You can assign the dates you've calculated into to an array. You can use ADDROWS if you don't know how big the array will be before you start. Anthony - [EMAIL PROTECTED] ----- Original Message ----- From: "John Hollister" <[EMAIL PROTECTED]> To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]> Sent: Sunday, November 03, 2002 12:48 Subject: Witango-Talk: date script > I need to get the start end date for each date within a set of dates > > From 8/01/2001 to 2/01/2002 > And I need to get this in a new array > > 8/01/2001, 8/31/2001; > > 9/01/2001, 9/30/2001; > > 10/01/2001, 10/31/2001; > > 11/01/2001, 11/30/2001; > > 12/01/2001, 12/31/2001; > > 01/01/2001, 01/31/2001; > > 02/01/2001, 02/28/2001; > > or a scripts that would help me maybe pre sort the month/Year in a > stored query? > > > ________________________________________________________________________ > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] > with unsubscribe witango-talk in the message body ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body