Results 1 to 3 of 3

Thread: Selecting a date interval from DB

  1. #1
    Join Date
    May 2015
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Selecting a date interval from DB

    Hello Everyone,

    What is wrong with this query ?
    Is only selecting June 17 to June 18.
    Code:
    SELECT myID, myDate, topic FROM myTable WHERE myDate >= '2015-06-17' AND myDate <= '2015-06-19';
    Any help will be greatly appreciated, and thank you in advance
    Last edited by james438; 09-03-2015 at 03:57 AM.

  2. #2
    Join Date
    May 2015
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Huh!! I got it, and post the answer in case some one run into the same issue

    Code:
    SELECT myID, myDate, topic FROM myTable WHERE DATE(`myDate`) BETWEEN '2015-06-17' AND '2015-06-19';
    Last edited by james438; 09-03-2015 at 03:58 AM. Reason: minor code format

  3. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    1,875
    Thanks
    92
    Thanked 97 Times in 95 Posts

    Default

    Closed since the thread is resolved and it has been attracting a lot of spam.

    I took the liberty of editing the first post to mark it as resolved.
    To choose the lesser of two evils is still to choose evil. My personal site

Similar Threads

  1. javascript set interval
    By Nirupamavinoth2 in forum JavaScript
    Replies: 1
    Last Post: 04-03-2012, 09:17 AM
  2. Setting a time change interval?
    By asclepius in forum JavaScript
    Replies: 1
    Last Post: 12-04-2007, 08:50 AM
  3. set timeout/set interval in cells
    By asclepius in forum JavaScript
    Replies: 0
    Last Post: 12-02-2007, 10:46 PM
  4. Replies: 1
    Last Post: 06-25-2007, 12:31 PM
  5. stop autumn leaves effect after time interval?
    By nevdev in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 08-02-2006, 11:53 PM

Bookmarks

Posting Permissions

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