End Date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gayatri prasanna
    New Member
    • Feb 2007
    • 10

    #1

    End Date

    Hello,

    can anyone help me in getting end date by comparing between a specified date and specified number of months using Asp.Net with c#

    For ex- 2/21/2006(mm/dd/yy) and 3 months.
  • Mohammadjan
    New Member
    • Feb 2007
    • 2

    #2
    Originally posted by gayatri prasanna
    Hello,

    can anyone help me in getting end date by comparing between a specified date and specified number of months using Asp.Net with c#

    For ex- 2/21/2006(mm/dd/yy) and 3 months.


    Hi, Just store your date value in a DateTime variable and then use date's function l
    Imagin your startdate is stored in this var --StartDate AS Date now you should use this ENDDate as Date = StartDate.AddMo nth(3) .

    Comment

    • shweta123
      Recognized Expert Contributor
      • Nov 2006
      • 692

      #3
      Hi,

      What do you want to do?

      If you want to add the months to date use
      DateAdd(DateInt erval.Month," 2,2/21/2006" )

      Or if you want to subtract from the date use
      DateDiff(DateIn terval.Month, 3, "2/21/2006")

      Comment

      Working...