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. Web Development
  3. ASP.NET
  4. Want to display based on date...............

Want to display based on date...............

Scheduled Pinned Locked Moved ASP.NET
5 Posts 4 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.
  • M Offline
    M Offline
    Member 3879881
    wrote on last edited by
    #1

    hi i have two tables like want to display based on the date: eg: table1: Id cardDate Intime1 Outtime1 1 12/22/2006 09:00 20:00 2 12/22/2007 09:00 20:00 3 12/22/2006 09:00 13:00 and table 2: Id leaveDate Intime2 Outtime2 3 12/22/2006 13:00 20:00 4 12/22/2006 09:00 20:00 5 11/11/2006 09:00 20:00 If i select the date 12/22/2006" then it want to display like: Id Carddate InTime1 Outtime1 Leavedate Intime2 Outtime2 1 12/22/2006 09:00 20:00 null null null 3 12/22/2006 09:00 13:00 12/22/2006 13:00 20:00 4 12/22/2006 09:00 20:00 null null null I am week in sqlquery,plz hlp me...,

    Magi

    R I C 3 Replies Last reply
    0
    • M Member 3879881

      hi i have two tables like want to display based on the date: eg: table1: Id cardDate Intime1 Outtime1 1 12/22/2006 09:00 20:00 2 12/22/2007 09:00 20:00 3 12/22/2006 09:00 13:00 and table 2: Id leaveDate Intime2 Outtime2 3 12/22/2006 13:00 20:00 4 12/22/2006 09:00 20:00 5 11/11/2006 09:00 20:00 If i select the date 12/22/2006" then it want to display like: Id Carddate InTime1 Outtime1 Leavedate Intime2 Outtime2 1 12/22/2006 09:00 20:00 null null null 3 12/22/2006 09:00 13:00 12/22/2006 13:00 20:00 4 12/22/2006 09:00 20:00 null null null I am week in sqlquery,plz hlp me...,

      Magi

      R Offline
      R Offline
      RaviJJain
      wrote on last edited by
      #2

      your sql query should like this select a.*,b.* from teble1 a, table2 b, where datedifff(dd,a.carddate,b.leavedate) = 0

      M 1 Reply Last reply
      0
      • R RaviJJain

        your sql query should like this select a.*,b.* from teble1 a, table2 b, where datedifff(dd,a.carddate,b.leavedate) = 0

        M Offline
        M Offline
        Member 3879881
        wrote on last edited by
        #3

        No it willn't work taht much exactly See once again my pre msg output.........,

        Magi

        1 Reply Last reply
        0
        • M Member 3879881

          hi i have two tables like want to display based on the date: eg: table1: Id cardDate Intime1 Outtime1 1 12/22/2006 09:00 20:00 2 12/22/2007 09:00 20:00 3 12/22/2006 09:00 13:00 and table 2: Id leaveDate Intime2 Outtime2 3 12/22/2006 13:00 20:00 4 12/22/2006 09:00 20:00 5 11/11/2006 09:00 20:00 If i select the date 12/22/2006" then it want to display like: Id Carddate InTime1 Outtime1 Leavedate Intime2 Outtime2 1 12/22/2006 09:00 20:00 null null null 3 12/22/2006 09:00 13:00 12/22/2006 13:00 20:00 4 12/22/2006 09:00 20:00 null null null I am week in sqlquery,plz hlp me...,

          Magi

          I Offline
          I Offline
          Imran Khan Pathan
          wrote on last edited by
          #4

          select CD.*,LD.* from Table1 as CD,Table2 as LD where cd.carddate=ld.leavedate and CD.carddate='"+ inputdate +"' and LD.leavedate='"+ inputdate +"'; I think it will be helpful to u Best regards Pathan

          GOD HELP THOSE WHO HELP THEMSELVES

          1 Reply Last reply
          0
          • M Member 3879881

            hi i have two tables like want to display based on the date: eg: table1: Id cardDate Intime1 Outtime1 1 12/22/2006 09:00 20:00 2 12/22/2007 09:00 20:00 3 12/22/2006 09:00 13:00 and table 2: Id leaveDate Intime2 Outtime2 3 12/22/2006 13:00 20:00 4 12/22/2006 09:00 20:00 5 11/11/2006 09:00 20:00 If i select the date 12/22/2006" then it want to display like: Id Carddate InTime1 Outtime1 Leavedate Intime2 Outtime2 1 12/22/2006 09:00 20:00 null null null 3 12/22/2006 09:00 13:00 12/22/2006 13:00 20:00 4 12/22/2006 09:00 20:00 null null null I am week in sqlquery,plz hlp me...,

            Magi

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Please, if you have a question, ask in the correct forum, and no-where else. Don't spam half the site.

            Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            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