Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    last day of quarter (97 sr2)

    Hi,
    Is there some code I can use to determine if a variable date is the last day of any given calendar quarter (3/31 or 6/30 or 9/30 or 12/31) without having to compare it to each date. It can be any year that is not important.
    thanks is advance
    Cathy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: last day of quarter (97 sr2)

    Say your field is named DateField. The following expression returns the last day of the quarter that DateField belongs to:

    DateSerial(Year([DateField]),3*((Month([DateField])+2)3)+1,0)

    So you can test whether

    [DateField]=DateSerial(Year([DateField]),3*((Month([DateField])+2)3)+1,0)

  3. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: last day of quarter (97 sr2)

    Works like a charm

    Thanks

Posting Permissions

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