Results 1 to 3 of 3

Thread: Date derivation

  1. #1
    Join Date
    Jun 2007
    Posts
    25

    Unanswered: Date derivation

    Hi all,
    I have a date in the format ddmmyyyy [concatonated number fields].
    I wish to check if this date is within one month of another date field ddmmyyyy [concatonated number fields].

    Im not sure how to check the different legths of months say 28 -31 days

    Thanks in advance

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    where months_between(first_date,second_date) between -1 and 1
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    If you are really storing the date as a number (ughhhh!!) then do the following

    where months_between(to_date(to_char(first_date),'ddmmyy yy'),to_date(to_char(second_date),'ddmmyyyy')) between -1 and 1
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

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