ChangeCONVERT(varchar(10), ISNULL(@irequireddate,'0001-01-01'), 10)
toCONVERT(varchar(10), ISNULL(@irequireddate, ''), 10)
Note that you should not use '2015-04-30' style for your dates as it is ambiguous and not guaranteed to work consistently. Use "yyyymmdd" instead (which is guaranteed UNambiguous) e.g. '20150430'. Same for your '0001-01-01' valuese.g. if the current user had a different language setting:SET LANGUAGE FRENCHGOselect convert(datetime, '2015-04-30')