Date mismatch in rows

msn1712

New Member
Joined
Mar 3, 2013
Messages
34
Hello,

I need a macro to make the date format standard across all the rows.

For eg. There are around 50,000 rows (which will change on daily basis) which has the dates. The problem is that the data I am using is for global level and so the date/time which I get is not in a standard format. So, if I have a data which is for Aug 1st, it's reading as Jan 8th, etc. Also, there are some dates which are actually in text format in the same row.

I tried creating some formula's (like splitting the day, month, year and concatenate), but it's not working.

Now what I am trying to do is, no matter the data is in any date format, I need to get the standard date format for each rows.

Hope someone can help me with this.

Regards,
Mohan
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Is the data already in Excel, or are you importing it into Excel?
The issue is the some places put month before day and others put day before month. So 1/8 could mean January 8 or August 1.
If the data is already in Excel and it is already a date, changing the date format will not change the actual underlying date, that is already set in stone.
If you were to change it, that change would be applied to ALL the dates. Otherwise, how could you tell which ones should be changed and which ones shouldn't?

So, we would need the answers to the following questions:
- Where is the data coming from (is it already in Excel or in some sort of Text file)?
- What are all the different date structures in the file?
- Which structures need to be changed and how?

Providing some actual examples may be helpful.
 
Upvote 0
Thank you Joe4 for your inputs..

1. We download the data from a particular tool in Excel format.
2. Below is the sample data from the report.

4/8/2017 16:10Reading as Apr 8th
4/8/2017 14:50Reading as Apr 8th
4/8/2017 22:53Reading as Apr 8th
1/8/2017 10:35Reading as Jan 8th
1/8/2017 10:35Reading as Jan 8th
1/8/2017 10:35Reading as Jan 8th
2/8/2017 9:10Reading as Feb 8th
2/8/2017 9:10Reading as Feb 8th
2/8/2017 9:10Reading as Feb 8th
27/07/2017 07:44Reading as text
29/07/2017 07:39Reading as text
29/07/2017 07:39Reading as text

<tbody>
</tbody><colgroup><col span="2"><col></colgroup>



Regards,
Mohan
 
Upvote 0
Sounds like a difference in Regional Settings. One is using dates in m/d/y format, and the other is using d/m/y format.
So I would recommend changing the settings in one or the other (Excel or the program initiating the file).
Or, if you have the ability to export the file to a Text file instead of Excel, you can then use Excel to import it where you can specify the date format of the data as you are importing it.

Otherwise, you would need to write two sets of conversions formulas:
- One to handle the date entries that need to have month and day flipped
- One to handle the text entries that need to have month and day flipped and convert the entry to a date
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,125,000
Members
449,202
Latest member
Pertotal

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top