Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:03:54+00:00 2026-06-13T20:03:54+00:00

On my table I have a Datemodified column. I was to be able to

  • 0

On my table I have a “Datemodified” column. I was to be able to pull results based on that Column. I want to be able to pull anything from 6am to 6pm. This query needs to be able to be used everyday, so the ways I’ve seen, use a specific date and I can’t get any of the queries I’ve looked for to work for my specific case.

Here is what I’ve gotten to work so far, it pulls the right hour time frame, but I need it to run only for the current day. Thanks all!

SELECT 
  Assignment
  , Datemodified
  , General
  , IncNumber
  , NextSteps
  , PDCRStatus
  , RootCause
  , Status
  , Summary
  , Timings
  , UserID 
FROM 
  Turnover 
WHERE 
  DATEPART(HOUR, datemodified) between 06 and 18 
  --AND datemodified = GETDATE()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:03:55+00:00Added an answer on June 13, 2026 at 8:03 pm

    Convert your datemodified field into a date without time and do the same to getdate(), then you can compare them…

    CONVERT(NVARCHAR(50),datemodified,103) = CONVERT(NVARCHAR(50),GETDATE(),103)

    so you get:

    SELECT Assignment, Datemodified, General, IncNumber, NextSteps, PDCRStatus,
    RootCause, Status, Summary, Timings, UserID FROM Turnover
    WHERE DATEPART(HOUR, datemodified) between 06 and 18
    AND CONVERT(NVARCHAR(50),datemodified,103) = CONVERT(NVARCHAR(50),GETDATE(),103)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have many tables that have a [DateCreated] column that also needs a [DateModified]
i need to implement this scenario Brief about that is have two java based
I have a table in SQL Server that contains a column for a ledger
I'm doing a mysql table and i have one column that has current timestamp
I have a mysql table with a column of date_modified and a timestamp set
My table have data structure like this cate_id task_id date_start date_end other 34 14
I have a table. In this table have select element. How can I find
My database table have a Timestamp column named as inTime and i am using
In each table have many number of rows with amount. Like this i have
I have a table with this structure (simplified): artID: 1 artName: TNT ArtBrand: ACME

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.