Hi,I need some help please :-)I have a stored procedure as below and when I execute it I ge the following error:Error converting data type nvarchar to datetime.The date sent to the sp must be in the format dd/MM/yyyy. How can i convert the dates in the sp so that the format will be recognised?EXEC @return_value = [dbo].[rep_seminars] @from_date = N'31/01/2000', @to_date = N'10/10/2007', @Country_id = 0ALTER PROCEDURE [dbo].[rep_seminars] @from_date datetime ,@to_date datetime,@Country_id intASBEGIN SET NOCOUNT ON;if @country_id=0set @country_id=nullSELECT Seminars.Venue_id, Venues.Venue_Name, Venues.Country_id, Countries.Country, CONVERT(datetime, Seminars.Start_Date, 103) AS start_date, dbo.Users_sys.Given_Names + ' ' + dbo.Users_sys.SurName AS PresenterFROM Seminars LEFT OUTER JOIN Venues ON Seminars.Venue_id = Venues.Venue_id LEFT OUTER JOIN Users_sys ON Seminars.Presenter_id = Users_sys.user_id LEFT OUTER JOIN Countries ON Venues.Country_id = Countries.Country_idWHERE ((Seminars.Start_Date BETWEEN @from_date AND @to_date) AND (Countries.Country_id = @Country_id or @Country_id is null ))or((@from_date is null and @to_date is null) and(Seminars.Start_Date >= CONVERT(smalldatetime, getdate(), 103))AND (Countries.Country_id = @Country_id or @Country_id is null))END
Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.