Calculate future months

From: Tencip (tencip_at_yahoo.com)
Date: 08/31/04


Date: 31 Aug 2004 06:25:48 -0700

Hi everyone,

I'm trying to build a simple script that does the following. It
should find today's month and year, and then go into a DB query string
and look for all records that are from this month and the next three
months.

I've been playing around with the date() function for a while now, and
from that I can pull today's month and year, but I'm having problems
with the transition from December to January. For instance, when i
use the date function to get the current month, which for example say
is December, when i try to get the third month after that, my current
function adds 3 to the current month (which is 12), and gets 15. I'm
not sure what quite to do to make a simple function that will wrap
back around to January (which would be 1). Additionally, at the end
of the year, the year function has to change as well. So, three
months after December 2004 is March 2005, so the calculation needs to
recognize that because my month has gone over 12, I need to add 1 to
my year.

Anyone face something similar to this?

Best,
tencip



Relevant Pages

  • Re: dynamically embedding objects in html
    ... I am looking forward to your script. ... flash movie I need to play is test.swf. ... sample code which decodes my query string and embeds the swf file I ...
    (alt.html)
  • Re: Find flagstatus
    ... I wouldn't ask you this if the folder where I should find these mailitems ... or query!? ... but I'll probably stick with the "for each" script I ... I always think it's a good idea to create the query string with a separate ...
    (microsoft.public.office.developer.outlook.vba)
  • Re: dynamically embedding objects in html
    ... Thanks Jojo! ... I plan to open the html page from my application. ... I am looking forward to your script. ... sample code which decodes my query string and embeds the swf file I ...
    (alt.html)
  • Response.Redirect
    ... Basically the form collates a whole bunch of data and builds a query string ... from the collected form fields. ... Url of the script and is sent using the Response.Redirect option. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Find flagstatus
    ... but I'll probably stick with the "for each" script I ... I always think it's a good idea to create the query string with a separate ... Sue Mosher, Outlook MVP ... I need to find only certain mailitems who are not flagged, ...
    (microsoft.public.office.developer.outlook.vba)