A conversion function really handy! Not totally in the subject: An easy trick to know the end date of one month without creating complex script to test the number of days in the months, years leap, etc.. Take the first date of the month, then add one month and substract one day, like this :
on mouseUp put "12/01/2009" into lMyDate answer addToDate(lMyDate,0,1,-1) end mouseUp function addToDate pStartDate,pAddToYear,pAddToMonth,pAddToDay convert pStartDate to dateitems add pAddToYear to item 1 of pStartDate add pAddToMonth to item 2 of pStartDate add pAddToDay to item 3 of pStartDate convert pStartDate to short date return pStartDate end addToDate -Zryip TheSlug wish you the best ! 8) > convert tDate to dateitems > add numDays to item 3 of tDate > convert tDate to short date -- or other format > > The nice thing about the convert command is that you can add any number of > days and it will figure out the right date anyway, changing the month and/or > year as necessary. > > -- > Jacqueline Landman Gay | [email protected] > HyperActive Software | http://www.hyperactivesw.com > _______________________________________________ > use-revolution mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
