DateTime fields from SQL Server display incorrectly in Excel

后端 未结 9 612
独厮守ぢ
独厮守ぢ 2020-12-12 16:34

Countless times during the day I am copying and pasting records from SQL Server Management Studio to Excel.

My problem is that a DateTime value such as

9条回答
  •  情书的邮戳
    2020-12-12 16:57

    I've had this same problem for a while as I generate a fair number of ad-hoc reports from SQL Server and copy/paste them into Excel. I would also welcome a proper solution but my temporary workaround was to create a default macro in Excel which converts highlighted cells to Excel's datetime format, and assigned it to a hotkey (Shift-Ctrl-D in my case). So I open Excel, copy/paste from SSMS into a new Excel worksheet, highlight the column to convert and press Shift-Ctrl-D. Job done.

提交回复
热议问题