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 6627615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:02:05+00:00 2026-05-25T22:02:05+00:00

Need an expert opinion here: I am trying to implement a scenario in one

  • 0

Need an expert opinion here:

I am trying to implement a scenario in one of our project which displays the graph based on user input and one of the input is date-time range. Let me describe with an example.

Consider an example where there are records having start-date-time = 2011-09-28 9:30 and end-date-time = 2011-09-28 11:30. Let’s say an user is trying to view a graph for date-time-range of 2011-09-28 10:00 to 2011-09-28 11:00 – now the system should show a graph since the data is available for the given period (since 10 – 11 is within 9.30 – 11.30).

How can I implement this scenario and how do I search for such inputs?

Note:
There might be too many rows for a particular date/date-time

Thanks.

  • 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-05-25T22:02:06+00:00Added an answer on May 25, 2026 at 10:02 pm

    You could use:

    SELECT * FROM your_table tb
    WHERE 
      (  user_start_time <= tb.start_date_time AND 
         user_end_time >= tb.start_date_time
      ) OR (
         user_start_time <= tb.end_date_time AND 
         user_end_time >= tb.end_date_time
      ) OR (
         user_start_time >= tb.start_date_time AND 
         user_end_time <= tb.end_date_time
      )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a project(PHP Based) in which I need to compute SHA1, I'm
I need a regex expert to help out on this one. Examples I've found
I have a technical question which need expert advise. I have a data in
Need some expert suggestions on using '$in' while performing 'update' in mongodb collections. Here
I need do write an expert systems that should aid user in picking up
I'm writing a Delphi expert. I need to be able to write a value
i need to convert a Utf-16BE in ISO-8859-1 in PHP (i'm not an expert
I am not a CSS expert (mainly because I haven’t had the need to
When updgrading to jQuery-1.7.1 (from 1.4.2) do I need to updgrade jQuery-UI? The project
I need a real DBA's opinion. Postgres 8.3 takes 200 ms to execute this

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.