Query expression to calculate last day of a quarter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yappy77
    New Member
    • Apr 2010
    • 37

    Query expression to calculate last day of a quarter

    I need an expression that will calculate the last day of a quarter based on a specific date.

    For example: Expiration date = 1/15/11; Last day of quarter = 3/31/11.

    I am not that great at writing query expressions so any help would be appreciated.

    Thanks,
    Yappy
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    1. Take the month
    2. Integer divide by 3
    3. Add one
    4. Multiply by 3
    5. Append "/1/" and the year
    6. DateAdd 1 month
    7. DateAdd -1 day

    Comment

    • yappy77
      New Member
      • Apr 2010
      • 37

      #3
      Rabbit,
      Thanks for the reply. Would you please show me the expression so that I can understand Steps 1 thru 7.

      Thanks,
      Yappy

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        That's not how it works Yappy. You're expected to do your own work. If you have a specific question with an individual step then please feel free to explain and we will help where we can. We don't do the work for you though.

        Comment

        Working...