Hi there,I'm trying to build a function that can calculate, for a period until5 months, the specified date.For example, if i select today's date, 2nd October, the function mustreturn the following dates:November 6December 4January 1february 5I've check and in some month the date, is days, distance is 28 but inothers it is 35. What happens for this number variation? I've analyzedthe number of weeks in a month, the start and end weekday of the monthand the number of days in the month but i can't seem to discover whathappens to be 35 or 28.Any help will be usefull.Thanks in advance.Regards
|
|
0
|
|
|
|
Reply
|
kubic62 (34)
|
10/2/2007 5:12:46 PM |
|
On Oct 2, 7:12 pm, Pedro Pinto <kubi...@gmail.com> wrote:> I'm trying to build a function that can calculate, for a period until> 5 months, the specified date.> For example, if i select today's date, 2nd October, the function must> return the following dates:>> November 6> December 4> January 1> february 5>> I've check and in some month the date, is days, distance is 28 but in> others it is 35. What happens for this number variation? I've analyzed> the number of weeks in a month, the start and end weekday of the month> and the number of days in the month but i can't seem to discover what> happens to be 35 or 28.Would you have spent five seconds and looked at a real calendar (onepeople hang up at the wall), you would have recognized that the dateis in some way "rounded" to the same day of week. The dates are allTuesdays. I'll leave it up to you to figure out if the "rounding" isup, down, nearest or whatever, and if the calculation is always donefrom the start date, or each next calculated date serves as a freshstarting point. It's your homework, not ours.
|
|
0
|
|
|
|
Reply
|
Hunter
|
10/2/2007 5:55:24 PM
|
|
On Tue, 02 Oct 2007 10:12:46 -0700, Pedro Pinto <kubic62@gmail.com>wrote, quoted or indirectly quoted someone who said :>I'm trying to build a function that can calculate, for a period until>5 months, the specified date.>For example, if i select today's date, 2nd October, the function must>return the following dates:>>November 6>December 4>January 1>february 5this is the sort of thing BigDate does in its sleep. It is bundledpart of http://mindprod.com/products1.html#COMMON11Look at the TestDate method which shows dozens of applications.-- Roedy Green Canadian Mind ProductsThe Java Glossaryhttp://mindprod.com
|
|
0
|
|
|
|
Reply
|
Roedy
|
10/3/2007 12:56:30 AM
|
|
In comp.lang.java.programmer message <1191345166.023670.315510@o80g2000hse.googlegroups.com>, Tue, 2 Oct 2007 10:12:46, Pedro Pinto<kubic62@gmail.com> posted:>>I'm trying to build a function that can calculate, for a period until>5 months, the specified date.The N'th X-day of the month is always the nearest X-day to the (7*N-3)thday of the month.The N'th X-day of the month always lies in the inclusive range from the(7*N-6)th to the (7*N)th of the month.-- (c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6. Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
|
|
0
|
|
|
|
Reply
|
Dr
|
10/3/2007 12:45:54 PM
|
|
|
3 Replies
108 Views
(page loaded in 0.079 seconds)
Similiar Articles: Month To Date Calculation - comp.soft-sys.sasHello Group, How can I achieve the Month To Date and Year To Date calculation I was trying Mr. Ian Whitlock macro code ... Date Range Calculation - comp.databases.filemakerLooking for some help please FileMaker6 on Mac. I have a database of invoices from many years. What I would like to create is a layout in which I ... Date and Time Calculation - comp.databases.filemakerI have a very simple problem, the solution of which is somehow evading me. I wish to take a starting date and time and add elapsed time to it (in ho... Date Due Calculation that Skips Weekends. - comp.databases ...You already have a field that calculates appointment date, so lets assume its called "appointment_date". Add the following calculation field (date result): Case ... Year to date calculation in OLAP cube - comp.soft-sys.sas ...I have fiscal year and fiscal month as dimensions in my OLAP cube as well as revenue as a measure. I would like to have a rolling total by fiscal y... Calculating Dates - comp.databases.filemakerDate and Time Calculation - comp.databases.filemaker Calculator: Add to or subtract from a date The Date Calculator calculates the duration between 2 dates. Calculating age on a specific date - comp.databases.filemaker ...i.e. RaceAge Calculation, Unstored, Number Result = Case(Date(Month(DOB); Day(DOB); Year(RaceDate))>RaceDate; Year ... calculate day, hour , sec between dates - comp.lang.java ...Month To Date Calculation - comp.soft-sys.sas 2 Replies 242 Views (0.066 seconds) Tweet ... Days between dates calculation, calculate online years between date Days ... Request for Help with Calculation - comp.databases.filemaker ...I have a "Year to Date" calculation that tells me everything that has been invoiced. When an invoice is paid, I enter the date in a "Date Paid" field. Pay by date... - comp.databases.filemakerThis must be simple but I got myself confused I have three fields (in a seperate settings database.) All I want is a simple calculation but my b... Calculator: Add to or subtract from a dateThe Date Calculator calculates the duration between 2 dates. It adds or subtracts days, weeks, months and years from a given date. Date Duration Calculator: Days between two datesThe duration calculator calculates the difference in number of days, months and years between two dates. 7/30/2012 12:05:47 PM
|