Inserting just the time segment
Hi,
I am passing some values into a stored proc from an ASP page, I am passing it in as a string in the format of
'00:00:00'
the problem is that it is addding the default date of 01/01/1900 during the insert. I have tried to use the convert function within the stored proc but it has not worked, this is probably more due to my code then the function. Below is the stored proc if you can tell me how to just pass in the time I would appeciate any help
CREATE PROCEDURE dbo.cnms_charges_update
@BAND_START datetime,
@BAND_END datetime,
@ROW_ID INT= NULL
AS
BEGIN
SELECT CONVERT(char(8),@BAND_START,8)
SELECT CONVERT(char(8),@BAND_END,8)
UPDATE charges SET
BAND_START = @BAND_START,
BAND_END = @BAND_END
WHERE
row_id = @ROW_ID
END
GO
many thanks
Peter
|