Date: Text to Columns - excel

As previously explained by one member of the community, I converted a text date format into a date format using "Text to columns"
Select column of dates then Data > text to columns > Next > Next > "under column data format" select "Date" and the format from dropdown (MDY or DMY) > OK
However, as you can see on the screenshot, some dates do not convert. I tried various things but do not find a reason. If anyone could help, it would be greatly helpful

The only way to replicate this seems to be formatting the cells appearance to dd.mm.yy. The fix being to change the cell format (visual mask) back to a standard date format. Text to columns does change the underlying data successfully.

Got it. Initially, my dates (text format) were MDY but I used DMY (in text to column)and it only worked for 60% of the dates. Then I used MDY (in text to column) and it works for 100% of the dates converted.

Related

Excel text to date format issue

I have the same issue as this OP when trying to change the date format
Excel 2010 date formatting not working on some cells but on others
The solution does work on converting those 'Text' to date format. However for the other datas in the same column which are in 'Date' format they give a #VALUE! error as shown in the image below when the entire column uses the formula.
Is there anyway to resolve this issue other than manually keying in the date which does not need to be fix, as I'm afraid in the future I might have more than a few thousands date to manually change
The formula I've used is this which the entire column uses,
=DATE(RIGHT(A2,4),LEFT(A2,FIND("/", A2,2)-1),MID(A2,FIND("/",A2)+1,2))
The data in column A is a mixture of text that looks like dates, and real dates. All rows with the error have the dates as real dates and the left/right/mid functions don't work on the format but on the underlying value, which in the case of the dates is a number. Try it just =RIGHT(A4,4) to see what I mean.
In order to run the formula, all data needs to be text. You can quickly convert the data to text by selecting column A, then click Data > Text to columns > Next > Next > Select "Text" in step 3 and click Finish.
The data will be converted to text and all your error values will disappear.

Excel - Convert Date & Time to Date Format

I am working with a column of data which contains a date/time stamp of an event. The printed form is in US format, as follows:
12/25/2014 11:00 AM
The cells are formatted as "General". I'm looking to convert the column into a Date / Time field for ease of filtering and searching. Thus far the only way I've been able to convert the text is to use "Text to Columns" and import the columns delimited by a Space, but this hasn't gotten me exactly what I want as it imports the date perfect, but the time is still text and in another column, which isn't pretty.
Is there an easier way? Thanks in advance
Since these values are apparently text strings, you won't be able to change the values by formatting. Excel stores dates (and times) as days and fractions of a day since 1/1/1900. You have, I believe, four non-VBA options:
Change the data before you enter into your worksheet, to be in the same format as your Windows Regional Settings short date (perhaps DMY?)
Change your Windows Regional Settings short date format to match that of the data you are importing.
Split the data using Text to Columns as you have been, then combine the two fields with an addition. e.g.
Original data in A1
Split data in A1:B1
Combine -- C1: =A1+B1
Copy C1; PasteValues (C1), then delete A1:B1
Use a formula to separate the different segments. The following assumes your Windows Regional settings AM/PM designation is, indeed, AM/PM, otherwise the formula would have to also account for that. Also, if the format is mm/dd/yyyy hh:mm AM/PM then the formula could be simplified. The formula below assumes the format is m/d/yyyy h:mm AM/PM and that AM/PM works in your locale.
=DATE(
MID(A1,FIND("/",A1,4)+1,4),
LEFT(A1,FIND("/",A1)-1),
MID(A1,FIND("/",A1)+1,FIND("/",A1,4)-FIND("/",A1)-1)
)
+TRIM(MID(A1,FIND(":",A1)-2,9))
You should try custom formatting of date and time.
If working with Google spreadsheet see this link.
If working with excel see this link.

Why are date values "slipping through" a filter in Excel?

I'm cleaning data in Excel that has a date column with mm/dd/yyyy values mixed with dd/mm/yyyy values where the former are date formatted and the latter are general formatted. The way I'm doing this is to filter out everything that's date formatted (ie: shows up in the filter as 1964 -> March -> 27, etc... at various levels), leaving only those that are general formatted (shows up in the filter as as 27/03/1964). When I do this, I find that there are still date-formatted cells visible. I'm wondering why this is? Is it a consequence of how the filter works or how Excel reads date values?
I can't comment, as I don't have a rating of over 50.
I had a similar issue that you had, and realised that my dates were actually formatted as text. Setting the dates to a YYYY-MM-DD format, the cells wouldn't change unless I double clicked the cell, then clicked off of it.

Different date formats in Excel

I have a csv that contains a list of dates, once imported into Excel they are in 2 different formats. How can I get them all in the same format?
Example:
01/23/2012
01/26/2012
40910
41031
You probably have a BIG issue with your file!
Probably, Excel is recognizing dates as "dd/mm/yyyy" but your data is "mm/dd/yyyy" formatted.
So, your numbers are really dates (just format, as #t.thielemans suggested). But are incorrectly parsed - month and day are switched!
Solution (assuming your dates are on A:A column):
To convert text to date:
=DATE(RIGHT(A1;4);LEFT(A1;2);MID(A1;4;2))
To correct day/month:
=DATE(YEAR(A1);DAY(A1);MONTH(A1))
Detect whether cell has date (dates are numbers, in Excel) or text:
=ISNUMBER(A1)
Finally, all combined within one formula:
=IF(ISNUMBER(A1);DATE(YEAR(A1);DAY(A1);MONTH(A1));DATE(RIGHT(A1;4);LEFT(A1;2);MID(A1;4;2)))
Just drag last formula from first row to end of your data and then format it as you wish (see #t.thielemans solution).
Select your data column and make sure they're highlighted. Go to Home>Number and select Custom and enter mm/dd/yyyy. You can also change the layout to one you want (mm-dd-yyyy/mmddyyyy/dd-mm-yyyy/...)

Convert Excel Text time to value

I have this format in an excel column:
00:03:30
It represents 3 minutes and 30 seconds.
I need to convert it to a numerical format where I can add them.
Is there a special kind of format I can use?
If the format is text then you can't change that by changing the formatting
Check whether the data is text by using this formula applied to one of the cells
=ISNUMBER(A2)
That will presumably give you FALSE
Assuming there are no additional characters in your data you can convert with "text to columns" - just select column of "times" then use
Data > Text to Columns > Finish
Now you should be able to sum and/or re-format the data

Resources