Jump to content

Need Help Setting Up A Query To Display A 24-hr Time Frame


ready2drum
 Share

Recommended Posts

Using the code below, I'm trying to setup a report whereby a user can select a start date and an end date (behind the scenes, the start date' starts at 7am and the 'end date' has the time of 6:59:59amard part is making sure that the start date begins at 7am and the end date is 6:59:59am of the next day.i.e. based on whatever date range the user selects, the stored procedure wiStart Date: 12/12/2009 7:00:00am and End Date: 12/13/2009 6:59:59am.

declare @Start_Date datetime, @End_Date datetimeset @Start_Date = dateadd(hh, 7, @Start_Date)set @End_Date = dateadd(ss, 25199, @End_Date)

I've been trying to get the code to work and could use some assistance.Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...