I have a table contain BulKewangan(char(10)) and ThnKewangan(int).
Example of BulKewangan is 21/9 and ThnKewangan is 2009.
So I want to combine both fields and then I want to add 4 months to that combination. How can I do that? I already do the query but still canot run
select DateAdd(Month, 4, convert(datetime,TkhTK+'/'+convert(varchar,ThnKew),103)) as Hingga
if I run query like this
select convert (char(10), dateadd (mm, 4, convert(datetime, rtrim(TkhTK)+'/'+ltrim(convert(char(5),ThnKew) )) ), 103) from tablename.
An error 'Conversion failed when converting datetime from character string.'
appear. How can I fix it?