I have a data set exported from Oracle to excel. There is a column with what appears as Date/Time in the format mm/dd/yyyy hh:mm:ss
.
However, it is not a number. It is formatted as general. No amount of converting has worked yet. I need to get it to convert to a standard date/time format in excel.
On the Home tab, under the “Number” Section, in the dropdown it indicates “General” No Specific Format. All the other choices in the drop down show the exact same format mm/dd/yyyy hh:mm:ss
.
I have tried:
Right Clicking the cells and selecting “Format Cells” and changing the Category.
Using the replace function to replace the “/” with “/” or replace them with “-“.
I tried DATEVALUE(TEXT(A1,"MM/DD/YYYY"))
I tried TIMEVALUE(TEXT(A1,"HH:MM:SS"))
I tried DATEVALUE(TEXT(A1,"MM/DD/YYYY"))+TIMEVALUE(TEXT(A1,"HH:MM:SS"))
I tried VALUE(A1)
I tried DATEVALUE(A1)+TIMEVALUE(A1)
I tried DATEVALUE(A1)
I have tried “text to columns” on the data tab.
I have tried removing the time. =LEFT(A1,10)
but that cuts the year short by 1 digit.
I have tried removing the time. =LEFT(A1,11)
this gives the appearance without the time, but it is still not a date.
I have tried converting the cells to text then doing a VALUE
function or DATEVALUE
function.
I have tried converting the cells to text then doing removing the time then doing a value function or DATEVALUE function.
Nothing seems to work. All I get is a value error or no change.
Time settings on the computer are UTC-06:00 Central Time (US & Canada) Language Region is English (United States) Regional format is "Recommended"
I have searched a lot of forums and watched several videos. Nothing seems to be working.
enter image description here
08/01/2024 15:39:38
08/01/2024 17:21:52
08/01/2024 15:39:38
08/01/2024 15:39:38
08/01/2024 17:25:01
08/01/2024 15:39:38
08/01/2024 15:39:38
10
Your data has a non printable character at the end and beginning of the string:
So use MID to get the data before and after them:
=--MID(A1,2,19)
and format as desired.
3