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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. sqlite

sqlite

Scheduled Pinned Locked Moved Database
databasecsharpsqlitehelptutorial
8 Posts 3 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.
  • J Offline
    J Offline
    jashimu
    wrote on last edited by
    #1

    Hi All, I am trying to create a report for every hour based on a selected day. I am trying to use sql statement. For example, I have dateTimePicker and I select a dy of a month then it should get all the data that took place from 12am to 11pm for every hour. FYI : my database sqlite. coding in C# thanks for any help in advance.

    D 1 Reply Last reply
    0
    • J jashimu

      Hi All, I am trying to create a report for every hour based on a selected day. I am trying to use sql statement. For example, I have dateTimePicker and I select a dy of a month then it should get all the data that took place from 12am to 11pm for every hour. FYI : my database sqlite. coding in C# thanks for any help in advance.

      D Offline
      D Offline
      Dimitri Witkowski
      wrote on last edited by
      #2

      And what is the problem? :)

      See my article about Windows 7 Taskbar timer here on CodeProject

      J 1 Reply Last reply
      0
      • D Dimitri Witkowski

        And what is the problem? :)

        See my article about Windows 7 Taskbar timer here on CodeProject

        J Offline
        J Offline
        jashimu
        wrote on last edited by
        #3

        Thanks Dmitry, I am not an expert in sql. therefore, I don't know how to do that. FYI: TableOne has Column Sell, quantity, emID,orderDate,shipDate. I want to know how many sell was made on a given day. And how many sell was made per hour in a gaven day(24 hours).

        D B 2 Replies Last reply
        0
        • J jashimu

          Thanks Dmitry, I am not an expert in sql. therefore, I don't know how to do that. FYI: TableOne has Column Sell, quantity, emID,orderDate,shipDate. I want to know how many sell was made on a given day. And how many sell was made per hour in a gaven day(24 hours).

          D Offline
          D Offline
          Dimitri Witkowski
          wrote on last edited by
          #4

          You should create a query with condition, like this: select count(*) from TaleOne where shipDate between <start_date> and <end_date> You can google and find how to use queries in sqlite, there are plenty of such info.

          See my article about Windows 7 Taskbar timer here on CodeProject

          1 Reply Last reply
          0
          • J jashimu

            Thanks Dmitry, I am not an expert in sql. therefore, I don't know how to do that. FYI: TableOne has Column Sell, quantity, emID,orderDate,shipDate. I want to know how many sell was made on a given day. And how many sell was made per hour in a gaven day(24 hours).

            B Offline
            B Offline
            Bassam Saoud
            wrote on last edited by
            #5

            SELECT COUNT(SELL) FROM TableOne GROUP BY CONVERT(DATETIME, orderDate, 101) The convert is to use short date For the hour look at DatePart[^] It is always good to read a book or tutorials before jumping to development.

            D 1 Reply Last reply
            0
            • B Bassam Saoud

              SELECT COUNT(SELL) FROM TableOne GROUP BY CONVERT(DATETIME, orderDate, 101) The convert is to use short date For the hour look at DatePart[^] It is always good to read a book or tutorials before jumping to development.

              D Offline
              D Offline
              Dimitri Witkowski
              wrote on last edited by
              #6

              SQLite doesn't have DatePart; you should save dates as long in sqlite.

              See my article about Windows 7 Taskbar timer here on CodeProject

              J B 2 Replies Last reply
              0
              • D Dimitri Witkowski

                SQLite doesn't have DatePart; you should save dates as long in sqlite.

                See my article about Windows 7 Taskbar timer here on CodeProject

                J Offline
                J Offline
                jashimu
                wrote on last edited by
                #7

                Thanks all for your help. I will try to do this at the same time I am going to read books on sql thanks.

                1 Reply Last reply
                0
                • D Dimitri Witkowski

                  SQLite doesn't have DatePart; you should save dates as long in sqlite.

                  See my article about Windows 7 Taskbar timer here on CodeProject

                  B Offline
                  B Offline
                  Bassam Saoud
                  wrote on last edited by
                  #8

                  My bad - missed that fact that its a SQlLite question. Nice article by the way.

                  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