Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
martin0642
 
Posts: n/a
Default How to change date from US to UK format


Hi all,

I have a large-ish spreadsheet (4000 entries) with a date of birth
column. For some reason when this file was ported from SPSS into Excel,
before being sent to me, the dates of birth got a bit screwed up.
ABout a third of them are in the format I want. UK format with
day-month-year. The rest are in US format with the month first. At the
moment I'm having to just go through them and type or copy hem into a
new column. Its essential I have the whole column in UK format.
Is there any formulas that can do this for me to save me typing it all
out?!! Any help would be MUCH appreciated!!!


--
martin0642
------------------------------------------------------------------------
martin0642's Profile: http://www.excelforum.com/member.php...o&userid=27589
View this thread: http://www.excelforum.com/showthread...hreadid=483447

  #2   Report Post  
Bryan Hessey
 
Posts: n/a
Default How to change date from US to UK format


The danger you have is that some dates are mis-converted.

Some dates will be correct format, and will align to the right of the
column (widen the column to seperate the two formats)
Other dates are 'text' entries, and as such are not considered dates,
and align to the left of the column.

You can seperate these by entering in B1 (assuming your dates are in
column A, and column B is empty)

=IF(ISERROR(MONTH(A1)),A1,"")

and formula-copy that down your 4,000 odd lines.


This should give you a column of non-dates. (so to speak)

Copy column B and Paste Special, Values back over column B.
Highlight Column B and Data, Text to Columns, and select the correct
date format (DMY or MDY as the dates exist) and 'Finish'

This should convert all the previously non-date values into dates.

In C1 put

=if(B1="",A1,B1)

and formula copy that for the 4,000 rows.

Copy column C and Paste Special Values over itsself (column C)

You can then remove columns A & B but you will need to check those
dates that were initially converted, I suspect there will be errors
there.

If you can retrieve a copy of the original file of dates before any
conversion that would be excellant, set a column as Text format, paste
them in, and then do Text to Columns on the complete column specifying
the correct format.

Cound I guess that these were originally imported under Excel '97?

Of course, SAVE your work under a different filename before you make
ant changes.


martin0642 Wrote:
Hi all,

I have a large-ish spreadsheet (4000 entries) with a date of birth
column. For some reason when this file was ported from SPSS into Excel,
before being sent to me, the dates of birth got a bit screwed up.
ABout a third of them are in the format I want. UK format with
day-month-year. The rest are in US format with the month first. At the
moment I'm having to just go through them and type or copy hem into a
new column. Its essential I have the whole column in UK format.
Is there any formulas that can do this for me to save me typing it all
out?!! Any help would be MUCH appreciated!!!



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=483447

  #3   Report Post  
martin0642
 
Posts: n/a
Default How to change date from US to UK format


Thank you!!! It worked. You saved me a LOT of retyping!! Thanks again
:)


--
martin0642
------------------------------------------------------------------------
martin0642's Profile: http://www.excelforum.com/member.php...o&userid=27589
View this thread: http://www.excelforum.com/showthread...hreadid=483447

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default How to change date from US to UK format

Before you celebrate, you may want to format that column of dates to an
unambiguous format:

mmmm dd, yyyy

Then compare some of the birthdates to the original source.

If someone's birthdate we 01/02/03, it may look like a valid date after you
imported it, but it might not be the real date (Jan 2, 2003, Feb 1, 1903)

martin0642 wrote:

Thank you!!! It worked. You saved me a LOT of retyping!! Thanks again
:)

--
martin0642
------------------------------------------------------------------------
martin0642's Profile: http://www.excelforum.com/member.php...o&userid=27589
View this thread: http://www.excelforum.com/showthread...hreadid=483447


--

Dave Peterson
  #5   Report Post  
Bryan Hessey
 
Posts: n/a
Default How to change date from US to UK format


Thanks Dave, that's what I would have suspected (as per my comments)

If the incorrect dates can be identified (ie, original 'Dates', or all
have Month and Day < 13) then they can be cured with something like

=MONTH(A1)&"/"&DAY(A1)&"/"&YEAR(A1)
or
=DAY(A1)&"/"&MONTH(A1)&"/"&YEAR(A1)

but, identifying is the problem.



Dave Peterson Wrote:
Before you celebrate, you may want to format that column of dates to an
unambiguous format:

mmmm dd, yyyy

Then compare some of the birthdates to the original source.

If someone's birthdate we 01/02/03, it may look like a valid date
after you
imported it, but it might not be the real date (Jan 2, 2003, Feb 1,
1903)

martin0642 wrote:

Thank you!!! It worked. You saved me a LOT of retyping!! Thanks

again
:)

--
martin0642

------------------------------------------------------------------------
martin0642's Profile:

http://www.excelforum.com/member.php...o&userid=27589
View this thread:

http://www.excelforum.com/showthread...hreadid=483447

--

Dave Peterson



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=483447



  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default How to change date from US to UK format

I find it much safer to reimport the data from the original source.

(Then I can sleep better at night <bg.)

Bryan Hessey wrote:

Thanks Dave, that's what I would have suspected (as per my comments)

If the incorrect dates can be identified (ie, original 'Dates', or all
have Month and Day < 13) then they can be cured with something like

=MONTH(A1)&"/"&DAY(A1)&"/"&YEAR(A1)
or
=DAY(A1)&"/"&MONTH(A1)&"/"&YEAR(A1)

but, identifying is the problem.

Dave Peterson Wrote:
Before you celebrate, you may want to format that column of dates to an
unambiguous format:

mmmm dd, yyyy

Then compare some of the birthdates to the original source.

If someone's birthdate we 01/02/03, it may look like a valid date
after you
imported it, but it might not be the real date (Jan 2, 2003, Feb 1,
1903)

martin0642 wrote:

Thank you!!! It worked. You saved me a LOT of retyping!! Thanks

again
:)

--
martin0642

------------------------------------------------------------------------
martin0642's Profile:

http://www.excelforum.com/member.php...o&userid=27589
View this thread:

http://www.excelforum.com/showthread...hreadid=483447

--

Dave Peterson


--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=483447


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
I cannot change the date format to English canada DStanfield Excel Discussion (Misc queries) 2 September 28th 05 06:23 PM
How change Excel default date format to something useful mjk Excel Discussion (Misc queries) 1 September 26th 05 08:15 PM
How to format a date to a different format Laura Excel Discussion (Misc queries) 1 March 5th 05 09:59 PM
change date function format in footer Tori Excel Worksheet Functions 1 January 25th 05 08:18 PM


All times are GMT +1. The time now is 03:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"