Jump to content

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


ready2drum

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...