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
Feb 01, 2022Copper Contributor
klamaa
Sep 29, 2022Copper Contributor
Hi HansVogelaar
I don't have separeted value. My SQL has this value Tue Jan 11 2022 00:00:00 GMT+0100 and I am trying to convert it into date but it is not working. Any advice please?
Best,
- klamaaSep 29, 2022Copper ContributorMany thanks Hans
- HansVogelaarSep 29, 2022MVP
Let's say you get such a date value in D2. In another cell in row 2, enter the formula
=DATEVALUE(MID(D2,9,2)&"-"&MID(D2,5,3)&"-"&MID(D2,12,4))+TIMEVALUE(MID(D2,17,8))and format the cell with the formula as date + time.
The formula can be filled down.