|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dates and how to set their hours in ms sql server?
hello this is my store procedure and i want to set the hour of the first date to be 00:00:00 and the hour of the second date to be 23:59:59 but i don't know how to do this,so please HELP me
CREATE PROCEDURE dbo.Proba @date1 smalldatetime , @date2 smalldatetime, @s float output AS Select @s=sum(Pay) from RKO where Dates between @date1 AND @date2 GO |
|
#2
|
||||
|
||||
|
even if the procedure is called with some non-zero time component?
the trick here might be something like ... where Dates >= @date1 AND Dates < dateadd(d,1,@date2) |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Dates and how to set their hours in ms sql server? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|