+ Reply to Thread
Results 1 to 6 of 6

How to use month() and day() without considering year()?

  1. #1
    Eric
    Guest

    How to use month() and day() without considering year()?

    I would like to determine whether today is within a period or not, such as
    Is today between 1-Mar and 1-Apr without considering year?
    Does anyone know how to do it?
    Thank for any suggestion
    Eric

  2. #2
    Guest

    Re: How to use month() and day() without considering year()?

    Hi

    You could try something like:
    =MONTH(TODAY())=3

    Andy.

    "Eric" <[email protected]> wrote in message
    news:[email protected]...
    >I would like to determine whether today is within a period or not, such as
    > Is today between 1-Mar and 1-Apr without considering year?
    > Does anyone know how to do it?
    > Thank for any suggestion
    > Eric




  3. #3
    wAyne
    Guest

    RE: How to use month() and day() without considering year()?

    Eric,

    you could use
    =IF(AND(MONTH(NOW())>1,MONTH(NOW()) <4),TRUE,FALSE)

    this will be true for dates in Feb and March ---- no matter the year.....

    wAyne
    "Eric" wrote:

    > I would like to determine whether today is within a period or not, such as
    > Is today between 1-Mar and 1-Apr without considering year?
    > Does anyone know how to do it?
    > Thank for any suggestion
    > Eric


  4. #4
    Eric
    Guest

    Re: How to use month() and day() without considering year()?

    Thank for everyone suggestion

    The period between 1-Mar and 1-Apr may make people misunderstand always
    starting at the first day of each month,
    what about the period between 21-Mar and 14-Apr? then it will need month()
    and day() for this condition.
    Does anyone have any suggestion?
    Thank you in advance
    Eric

    "Andy" wrote:

    > Hi
    >
    > You could try something like:
    > =MONTH(TODAY())=3
    >
    > Andy.
    >
    > "Eric" <[email protected]> wrote in message
    > news:[email protected]...
    > >I would like to determine whether today is within a period or not, such as
    > > Is today between 1-Mar and 1-Apr without considering year?
    > > Does anyone know how to do it?
    > > Thank for any suggestion
    > > Eric

    >
    >
    >


  5. #5
    wAyne
    Guest

    Re: How to use month() and day() without considering year()?


    If you have the month and day you wish to compare in certain columns, then
    you could use the date function.
    for example

    A1 = 3 start month - March
    A2 = 21 start day - 21
    A3 = date(year(now()),A1,A2) = March 21, 2006


    B1= 4 start month - April
    B2 = 14 start day - 14
    B3= date(year(now()),B1,B) = April 14, 2006


    F1 = =IF(AND(MONTH(NOW())>A3,MONTH(NOW()) <B3),TRUE,FALSE)

    you may have to do some tweaking with Year(Now()) to contend with start and
    end dates going to next year.. but it shoudl work.

    wAyne_

    "Eric" wrote:

    > Thank for everyone suggestion
    >
    > The period between 1-Mar and 1-Apr may make people misunderstand always
    > starting at the first day of each month,
    > what about the period between 21-Mar and 14-Apr? then it will need month()
    > and day() for this condition.
    > Does anyone have any suggestion?
    > Thank you in advance
    > Eric
    >
    > "Andy" wrote:
    >
    > > Hi
    > >
    > > You could try something like:
    > > =MONTH(TODAY())=3
    > >
    > > Andy.
    > >
    > > "Eric" <[email protected]> wrote in message
    > > news:[email protected]...
    > > >I would like to determine whether today is within a period or not, such as
    > > > Is today between 1-Mar and 1-Apr without considering year?
    > > > Does anyone know how to do it?
    > > > Thank for any suggestion
    > > > Eric

    > >
    > >
    > >


  6. #6
    Eric
    Guest

    Re: How to use month() and day() without considering year()?

    Thank you very much
    Eric

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1