Thread: Help in query..

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    29
    Rep Power
    0

    Help in query..


    I had tried a lot but can get it...
    I am trying to get the number of day form current timestamp and previous timestamp(suppose previous 8 days) it should give me 8 days from current_timestamp
    My format in database is like this 2012-11-30-16.49.51.012908

    Please Help......
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,172
    Rep Power
    4274
    use the DATEDIFF() function
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo