CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 1999
    Location
    USA
    Posts
    25

    Determining Month

    Here's the deal...

    I have an Access 97 query which is dependent on a month criteria. Presently, it looks at the current month and subtracts 1 from it to get the proper reporting month.

    This is a problem, since 01 (being Jan) - 1 is zero: not twelve.

    What I would like to do is create a function that will determine the previous month. Does anyone have any suggestions????

    Thanks,
    Sam


  2. #2
    Guest

    Re: Determining Month

    Hi !

    In the Access query, create an expression containing the date and add -30 to it. You will get the all previous months
    from the query.One thing to remember is adding -30 days will give previous month.

    Satya
    Email: [email protected]


  3. #3

    Re: Determining Month

    About -30. Will that work with months that have 28 days and ones that have 31 days?


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured