Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    london
    Posts
    6

    Unanswered: date manipulations

    Does anyone know what is being achieved by the following statement in the where clause.
    Select from table1,table2,table3 etc etc...
    where
    datefield1 between (datefield2 - 30/(24*60*60)) and (datefield3 + 30/(24*60*60))

    Why divide by 30?

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: date manipulations

    It means "datefield1 between (30 seconds before datefield2) and (30 seconds after datefield3)".

    There are 24*60*60 seconds in a day, so 30 seconds = 30/(24*60*60) days.

    (There is no "divide by 30"!)

Posting Permissions

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