Re: DateSerial question

From: Rick Brandt (rickbrandt2_at_hotmail.com)
Date: 10/26/04


Date: Tue, 26 Oct 2004 15:32:03 -0500


"JMorrell" <JMorrell@discussions.microsoft.com> wrote in message
news:C8139417-3977-4182-A349-9983F9BFBFC1@microsoft.com...
> > ... add the third parameter less one, which in this case would give you
the
> last
> > day of the previous month.
>
> Not following you on this one. How does a zero (0) in the last
parameter,
> give the last day of previous month? Sorry, but I just don't see it.

Simple. The zeroth of a month is equal to the last day of the previous
month. It is one day before the first of the month right?

DateSerial is fully aware of all wrap points in the calendar. You can use
numbers that are too large (the 100th of a month for example) and you can
even use negative numbers for any of the arguments and DateSerial will
properly figure out what the correct date to return is factoring in leap
years and everything.

It really is the single-most versatile date function I've ever run across.
How I wish a few of the other platforms I work with had a similar one.

-- 
I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com


Relevant Pages

  • Re: Turn off ZeroDivisionError?
    ... platforms do exactly what I want for division by zero: ... Python doesn't generate exceptions for other floating point ... case of division by zero. ...
    (comp.lang.python)
  • Re: Null pointers
    ... >> zero is a valid location, and you can safely read and write from it. ... However most platforms won't allow this. ... actually several common desk top operating systems that you happen ... you can access memory at address "all bits 0". ...
    (comp.lang.c)
  • Re: alignment
    ... union {char a; int i;} u; ... Besides, if it does "work," how can you check that it does the same thing on all the platforms of interest to you? ... On a long-ago platform I learned on, it would zero out ...
    (comp.lang.c)
  • Re: udp.c
    ... >> it may be necessary to have something mapped at page zero ... > Are there any existing platforms that do that in kernel mode? ... doesn't handle this properly and this usually hangs the machine. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)