Forum Discussion
pbjerre
Jan 25, 2022Copper Contributor
Change dataformat from SQL in Excel
Hi. We have a problem converting a time stamp export from SQL 2019. Is there a way to convert it inside Excel (Not in the Database export) to a number. It has the format Year-MM-DD HH:MM:SS,000 like:...
pbjerre
Jan 27, 2022Copper Contributor
Dear Hans
Thanks for the input. In the Data>Get Data>... the type is datetime
When I use: =DATE(LEFT(A2,4),MID(A2,6,2),MID(A2,9,2))+TIMEVALUE(MID(A2,12,12))
on the cell I get #value!
Something goes wrong.
HansVogelaar
Jan 27, 2022MVP
It should work with the example that you provided:
If you want a number instead of a date and time, set the number format of the cell with the formula to General or to Number.
I'd have to see a sample workbook to know why it doesn't work for you.
- pbjerreJan 31, 2022Copper Contributor
- pbjerreJan 31, 2022Copper Contributor
Here is the sample xls file
- SergeiBaklanJan 31, 2022Diamond Contributor