A table contains a field of type smalldatetime
The feed has this field as string i.e. '060830'
Would like to insert this string date into the field of the table which has a datatype of smalldatetime.
Is this the correct way to convert a string to smalldatetime?
declare @DateFeed varchar(6)
declare @TradeDate smalldatetime
set @DateFeed = '060830'
set @TradeDate = convert(smalldatetime, 6 + '-' + 8 + '-' + 30)