Loading ...
Sorry, an error occurred while loading the content.
 

Urgent - Need to get the last day (in date format) of each month

Expand Messages
  • mikijafe
    Hi, Please help me with: I Need to get the last day (in date format) of each month, in order to sum up quantities per full months. The user will give me a
    Message 1 of 3 , Nov 23, 2005
      Hi,
      Please help me with:

      I Need to get the last day (in date format) of each month, in order to
      sum up quantities per full months.
      The user will give me a date, I'll need to go back, 9 months and sum up
      for each month of the 9.
      problem : subtracting full months (with ADD_MONTHS) does not
      necessarily bring me to the last day of the prior month... :-(
      So, I wonder is there a function, that would do it, go back or
      forward "calendar wise"?
      Please try and help me here, thanx
      Miki
    • hjwoudenberg@aol.com
      In a message dated 11/24/2005 2:01:59 P.M. Central Standard Time, michal.jaffee@ecitele.com writes: Please try and help me here, thanx Miki With my software I
      Message 2 of 3 , Nov 24, 2005
        In a message dated 11/24/2005 2:01:59 P.M. Central Standard Time, michal.jaffee@... writes:
        Please try and help me here, thanx
        Miki
        With my software I can
            Set the day of the month to 01
            Add 1 month to the given month
            Subtract one day from day 01.
         
        hjw
      • Tom caT
        in visual basic and the like, i take the date of the fisrt day of a month, and subtract one day from it, and so i get the last day of the previous month.
        Message 3 of 3 , Nov 24, 2005
          in visual basic and the like, i take the date of the fisrt day of a month, and subtract one day from it, and so i get the last day of the previous month.

          last_day = DateSerial(myYear, myMonth +1, -1)

          HTH

          mikijafe <michal.jaffee@...> wrote:
          Hi,
          Please help me with:

          I Need to get the last day (in date format) of each month, in order to
          sum up quantities per full months.
          The user will give me a date, I'll need to go back, 9 months and sum up
          for each month of the 9.
          problem : subtracting full months (with ADD_MONTHS) does not
          necessarily bring me to the last day of the prior month... :-(
          So, I wonder is there a function, that would do it, go back or
          forward "calendar wise"?
          Please try and help me here, thanx
          Miki





          ------------------------ Yahoo! Groups Sponsor --------------------~-->
          Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
          http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/1U_rlB/TM
          --------------------------------------------------------------------~->


          Yahoo! Groups Links

          <*> To visit your group on the web, go to:
          http://groups.yahoo.com/group/ISO8601/

          <*> To unsubscribe from this group, send an email to:
          ISO8601-unsubscribe@yahoogroups.com

          <*> Your use of Yahoo! Groups is subject to:
          http://docs.yahoo.com/info/terms/






          Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
        Your message has been successfully submitted and would be delivered to recipients shortly.