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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:24:22+00:00 2026-06-15T23:24:22+00:00

I’m writing a report that will show response times. Requests can come in at

  • 0

I’m writing a report that will show response times. Requests can come in at any time, but any request done after 5:30 PM and before 7:30 AM should default to 7:30 AM as the requesttime

SELECT 
   Meeting_Invites.Invite_ID, ResponseDateTime, 
   REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') AS Time,
   CASE 
      WHEN REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') > 1730 OR 
           REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') < 0730 
      THEN 1 
      ELSE 0 
   END AS NextDay, 
   CASE 
      WHEN REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') > 1730 
        THEN 'Next Day' 
      WHEN REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') < 0730 
        THEN 'Same Day' 
      ELSE '' 
   END AS DateType
FROM 
   Meeting_Invites 
WHERE 
   ResponseDateTime BETWEEN {ts '2012-11-01 00:00:00'} AND {ts '2012-12-15 23:59:59'}
ORDER BY 
   Time

Which produces the results below. Is there a way to create a date that would match my CreatedDate column?

ID      Date                            Time    DateType CreatedDate
--------------------------------------------------------------------------------
84613   2012-12-06 07:29:02.823 0729    1   Same Day 2012-12-06 07:30:00
84079   2012-11-11 07:47:39.947 0747    0            (Use Date column)
84048   2012-11-05 08:13:50.423 0813    0            (Use Date column)
84372   2012-11-19 08:14:23.820 0814    0            (Use Date column)
84163   2012-11-13 20:43:19.760 2043    1   Next Day 2012-11-14 07:30:00
83527   2012-11-09 21:19:52.917 2119    1   Next Day 2012-11-10 07:30:00
84374   2012-11-26 21:35:21.887 2135    1   Next Day 2012-11-17 07:30:00
82518   2012-11-08 21:59:11.413 2159    1   Next Day 2012-11-09 07:30:00

I’m using ColdFusion to create the report, so I could built in the logic when I run the report, but would prefer not to.

  • 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-15T23:24:23+00:00Added an answer on June 15, 2026 at 11:24 pm
    SELECT Meeting_Invites.Invite_ID, ResponseDateTime, REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') AS Time
    , CASE WHEN REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') > 1730 OR REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') < 0730 THEN 1 ELSE 0 END AS NextDay
    , CASE WHEN REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') > 1730 THEN 'Next Day' WHEN REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') < 0730 THEN 'Same Day' ELSE '' END AS DateType
    , CASE WHEN REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') > 1730 THEN
                DATEADD(dd, 1, CONVERT(DATETIME(CONVERT(VARCHAR(10), ResponseDateTime, 121) + ' 07:30:00', 121)))
           WHEN REPLACE(CONVERT(varchar(5), ResponseDateTime, 108), ':', '') < 0730 THEN 
                CONVERT(DATETIME(CONVERT(VARCHAR(10), ResponseDateTime, 121) + ' 07:30:00', 121))
           ELSE ResponseDateTime END AS CreatedDate
    FROM Meeting_Invites 
    WHERE ResponseDateTime BETWEEN {ts '2012-11-01 00:00:00'} AND {ts '2012-12-15     23:59:59'}
    ORDER BY Time
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I want to show the soap response to UIWebview.. my soap response is, <p><img
I need a function that will clean a strings' special characters. I do NOT
I am writing an app with both english and french support. The app requests
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the

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.