Excel converts hyphened text into a date -
when copy data query results of sql server db , pasted on excel hyphenated text converted date.
like 2-12 gets converted 12-feb. how can avoid that?
one way in sql server query convert sql server column text , append apostrophe in front of it. when paste excel should pasted text, not date. e.g.
select '''' + convert(nvarchar,field_name) table_name
you need select column in excel, right click it, select format cells , change format text. can replace apostrophe , column preserved text , not automatically converted date format.
Comments
Post a Comment