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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:28:05+00:00 2026-05-26T19:28:05+00:00

I heed to define 2 parameters in reporting services to select date between 2

  • 0

I heed to define 2 parameters in reporting services

  1. to select date between 2 dates (ideally 2 calendars)
  2. to select time; I have 3 needed ranges (08:00:00-15:59:59, 16:00:00-23:59:59, 00:00:00-07:59:59) Ideally 3 buttons.

Any ideas?

  • 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-26T19:28:05+00:00Added an answer on May 26, 2026 at 7:28 pm

    I would use three parameters:

    1. FromDate with prompt of “From:”, DateTime type.
    2. ToDate with prompt of “to:” DateTime type.
    3. TimeRange with prompt “Times:” Int type with three hardcoded options:

    Possible value for TimeRange:

    Value  Label
    1      0 - 8
    2      8 - 16
    3      16 - 0
    

    Note that you can set the labels to whatever will help your users: “Early shift (Midnight – 8AM)”

    Then in your SQL hand in the TimeRange parameter as an int and convert it to two parameters for your SQL.

    DECLARE @StartHour INT
    DECLARE @EndHour INT
    
    SET @StartHour = CASE @TimeRange WHEN 1 THEN 0
                                     WHEN 2 THEN 8
                                     WHEN 3 THEN 16
                     END
    
    SET @EndHour = CASE @TimeRange   WHEN 1 THEN 8
                                     WHEN 2 THEN 16
                                     WHEN 3 THEN 24
                     END
    
    
    SELECT
       *
    FROM
       LogEntries
    WHERE
       LogEntries.TimeOfEntry >= @FromDate
       AND LogEntries.TimeOfEntry < @ToDate
       AND DATEPART( hh , LogEntries.TimeOfEntry ) >= @StartHour
       AND DATEPART( hh , LogEntries.TimeOfEntry ) < @EndHour
    

    (Don’t use BETWEEN if you are using my exact code, it won’t handle the EndHour appropriately.)

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

Sidebar

Related Questions

Is there analog og the MySQL's time_to_sec() ? I heed to perform query like
I’m a big fan of ampersands – so much that I heed SimpleBits’ advice
Technically, the XSLT processor is not required to heed the xsl:output element and it
I want to be able to have a container element which contains the content
This query is pretty self explanatory: $networks = '6,7,8'; $query = SELECT DISTINCT countryName
I heed two variables storing the maximum id from a table, and the minimum
I heed to access the Div with ID=rptMessages_ctl04_PanelComment , so that I can access
In portaint Actionsheet show in tabbar. In landscape - in window. I heed do
So, I'm wanting to get a better grasp on how string literals in C++
So I'm trying to make use of a GtkSourceView in C++ using GtkSourceViewmm ,

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.