SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Sorting by Date

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Location
    Australia
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sorting by Date

    I want to run a sql query that returns records from a particular date range, say by month.

    One of the fields is a date field type datetime.

    anyway any help would be great.

    thanks.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,498
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)
    Maybe something like
    SELECT whatever FROM table WHERE datefield > 'date' AND datefield < 'date' ORDER BY datefield (either ASC or DESC)


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
  •