This message was edited by anrice at 2004-3-15 7:49:1
I want to check the time element of a date entered against the
a field that stores the Working Day Start Time to see if the time element of the date entered precedes or is after the Day Start Time.
I can currently do this using datediff and playing around with date calculations but what is the easiest way to do so?
The code I am currently using is along the lines of:
declare @dat_starttime as datetime,
@dat_to as datetime,
@int_interval as dec (7,5)
SELECT @dat_starttime = '14:00', @dat_to = '15-mar-2004 13:15'
select @int_interval = datediff(minute,@dat_starttime, @dat_to - datediff(day,@dat_starttime,@dat_to))