about date add in access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • varunpasrija
    New Member
    • Sep 2011
    • 2

    about date add in access

    how can i add a month in last date in report in access.
    like 3-6-11 after adding a month the date will be 3-7-11 after adding a month the date will be 3-8-11 then 3-9-11,3-10-11........
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    It doesn't sound like you want to add months at all. It looks like you want to add a day.

    Comment

    • varunpasrija
      New Member
      • Sep 2011
      • 2

      #3
      it is for the installment...

      Comment

      • jimatqsi
        Moderator Top Contributor
        • Oct 2006
        • 1290

        #4
        Rabbit, the poster is using the European date formatting, so the month is in the middle.

        The solution is to use the DateAdd function. It looks like this:
        Code:
        NewDate = DateAdd('m',1,OriginalDate) ' 1 month being added to OriginalDate
        You may also want to look at function DateSerial, as it is often helpful in creating dates. For your problem it could be used like this:
        Code:
        NewDate=Dateserial(Year(OriginalDate),Month(OriginalDate+1),Day(OriginalDate)
        DatePart is also a helpful function. Have fun learning about these helpful functions :)

        Jim

        Comment

        Working...