Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007
    Posts
    6

    Unanswered: difference of dates

    In what way I can get the difference of 2 dates in months.

    say
    date1 is '04/23/2006'
    and
    date2 is '02/23/2005'

    The difference between these 2 dates is 14 months.
    writing which query I could get this result.
    Could you please help us in getting the query

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Simple statement like
    Code:
    values date('04/23/2006') - date('02/23/2005')
    will give you a number like "10200", where "1" is the number of full years, "02" is the number of months, and "00" is the number of days between the two dates. It should be easy to calculate the number of months from there.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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