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. Database & SysAdmin
  3. Database
  4. retrieve current week's data

retrieve current week's data

Scheduled Pinned Locked Moved Database
databasehelpquestion
3 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
    SeeSharp 0
    wrote on last edited by
    #1

    Hi all, Is there any way to get current weeks detail frm the database using SQL 2000?? For e.g. today is wednesday, i want all data from monday to sunday. Plz can anyone help in this

    --Here 2 See Sharp-- I have not failed. I've just found 10,000 ways that won't work. :)

    K 1 Reply Last reply
    0
    • S SeeSharp 0

      Hi all, Is there any way to get current weeks detail frm the database using SQL 2000?? For e.g. today is wednesday, i want all data from monday to sunday. Plz can anyone help in this

      --Here 2 See Sharp-- I have not failed. I've just found 10,000 ways that won't work. :)

      K Offline
      K Offline
      Krish KP
      wrote on last edited by
      #2

      DATEPART() function should solve your problem Ex. WHERE DatePart(wk, Convert(DateTime, ColA)) = DatePart(wk, Convert(DateTime, getdate())) AND Year(ColA) = Year(GetDate())

      Regards KP

      S 1 Reply Last reply
      0
      • K Krish KP

        DATEPART() function should solve your problem Ex. WHERE DatePart(wk, Convert(DateTime, ColA)) = DatePart(wk, Convert(DateTime, getdate())) AND Year(ColA) = Year(GetDate())

        Regards KP

        S Offline
        S Offline
        SeeSharp 0
        wrote on last edited by
        #3

        Thanks Krish.. It worked....

        --Here 2 See Sharp-- I have not failed. I've just found 10,000 ways that won't work. :)

        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