#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    9
    Rep Power
    0
    how to calculate the no of days between two different dates.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15


    i guess you are using this for a mysql query.

    if it is for mysql query then use TO_DAYS() for doing it .


    "SELECT field1,field2 FROM tbl_name WHERE TO_DAYS(now())-TO_DAYS(datefield)=7";



    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. working days between two dates
    By Najjar in forum PHP Development
    Replies: 12
    Last Post: February 9th, 2004, 06:28 PM
  2. Replies: 8
    Last Post: September 4th, 2003, 10:22 AM
  3. SELECT all dates 5 days from now
    By jpluttme in forum MySQL Help
    Replies: 2
    Last Post: July 15th, 2003, 12:26 PM
  4. Replies: 23
    Last Post: June 15th, 2003, 10:26 AM
  5. dates - detect groups of 7 days
    By drGiggles in forum PHP Development
    Replies: 7
    Last Post: March 24th, 2003, 02:24 PM

IMN logo majestic logo threadwatch logo seochat tools logo