Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. sorting by datetime

sorting by datetime

Scheduled Pinned Locked Moved C / C++ / MFC
databaseoraclealgorithmshelpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stv
    wrote on last edited by
    #1

    Dear all, I am cuurrently using DAO to access my oracle DB, i have a datetime field and would like to sort by the records according to dates/time. Anybody have any method sorting Dates or time using DAO? your help will be greatly appreciated!!!!:rolleyes:

    A 1 Reply Last reply
    0
    • S stv

      Dear all, I am cuurrently using DAO to access my oracle DB, i have a datetime field and would like to sort by the records according to dates/time. Anybody have any method sorting Dates or time using DAO? your help will be greatly appreciated!!!!:rolleyes:

      A Offline
      A Offline
      Abin
      wrote on last edited by
      #2

      Why don't you specify your sorting request in your SQL statement? Like this: "SELECT ... FROM ... WHERE ... ORDER BY (datetime_field_name)"

      S 2 Replies Last reply
      0
      • A Abin

        Why don't you specify your sorting request in your SQL statement? Like this: "SELECT ... FROM ... WHERE ... ORDER BY (datetime_field_name)"

        S Offline
        S Offline
        stv
        wrote on last edited by
        #3

        Thank's for replying, but i would like to sort it from a range of dates. U know how to do it in DAO using filters or using any method? Thank you very much:)

        1 Reply Last reply
        0
        • A Abin

          Why don't you specify your sorting request in your SQL statement? Like this: "SELECT ... FROM ... WHERE ... ORDER BY (datetime_field_name)"

          S Offline
          S Offline
          stv
          wrote on last edited by
          #4

          For those using DAO or mircosoftjet engine to sort date i found the solution Hope this will help you all!!! SELECT * FROM tblInvoices WHERE CustomerID = 1 AND InvoiceDate > #01/01/98# Note that the date string is enclosed in number signs (#). More details , http://www.abspos.net/HelpRT/Microsoft Jet SQL - Fundamentals.htm

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups