Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    4

    Unanswered: Number of Day between 2 dates ?

    Hi !

    Is there a function that return the number of days between 2 dates ?
    I search in the forum, but i didn't find the same subject...

    Thanks you

  2. #2
    Join Date
    Nov 2004
    Posts
    1,427
    Provided Answers: 4
    Code:
    select days(current date) - days(date('01/12/2005'))
    from ig_singlet
    With kind regards . . . . . SQL Server 2000/2005/2012
    Wim

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

  3. #3
    Join Date
    Nov 2005
    Posts
    15
    Hiya,

    what about using DAYS(var1) - DAYS(var2)?

    should work....

  4. #4
    Join Date
    Dec 2005
    Posts
    4
    Thanks Nuck an Wim.
    It's working

Posting Permissions

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