Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default convert US dates to UK dates

I am trying to populate a pivot with expiery dates presented in US fomat
mm/dd/yyyy. Due to default settings, which I am unable to change, it
currently reads the dates as UK dates dd/mm/yyyy, and therefore presents
those with mm value 12 as text. I used
=DATE(RIGHT(J10,4),LEFT(J10,2),MID(J10,4,2)) on the second scenario, and it
then presents these dates in UK format, but now this doesn't work on the
dates with month values < 12.

Any help on this will be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default convert US dates to UK dates

You could try something like this:

=IF(ISNUMBER(J10),DATE(YEAR(J10),DAY(J10),MONTH(J1 0)),DATE(RIGHT(J10,4),LEFT(J10,2),MID(J10,4,2)))

So, if it has already been recognised as a date then swap the day and
the month around, otherwise use your formula.

Hope this helps.

Pete

On Jul 29, 11:31*am, Labuscs
wrote:
I am trying to populate a pivot with expiery dates presented in US fomat
mm/dd/yyyy. *Due to default settings, which I am unable to change, it
currently reads the dates as UK dates dd/mm/yyyy, and therefore presents
those with mm value 12 as text. *I used
=DATE(RIGHT(J10,4),LEFT(J10,2),MID(J10,4,2)) on the second scenario, and it
then presents these dates in UK format, but now this doesn't work on the
dates with month values < 12.

Any help on this will be appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default convert US dates to UK dates

I think you may have more problems than you think.

If you imported the data from a text file and some of the data got converted to
dates and some didn't get converted, then the stuff that is really a date isn't
correct.

If you brought 02/03/2004 into your workbook, it may be a date, but it may not
be what the original data represented. I'd give the imported date column(s) an
unambiguous date format and double check some of the entries against what the
original text file had.

I think you'll find that it's time to import the text file once again without
letting excel guess how that field should be treated.

Labuscs wrote:

I am trying to populate a pivot with expiery dates presented in US fomat
mm/dd/yyyy. Due to default settings, which I am unable to change, it
currently reads the dates as UK dates dd/mm/yyyy, and therefore presents
those with mm value 12 as text. I used
=DATE(RIGHT(J10,4),LEFT(J10,2),MID(J10,4,2)) on the second scenario, and it
then presents these dates in UK format, but now this doesn't work on the
dates with month values < 12.

Any help on this will be appreciated.


--

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
how do I convert English (Canadian) dates to English (US) dates dinertx Excel Worksheet Functions 1 July 11th 08 03:59 PM
How do I convert dates stored as dates to text? diamunds Excel Discussion (Misc queries) 5 September 7th 07 05:38 PM
Convert dates hmm Excel Worksheet Functions 3 January 2nd 07 10:01 AM
Convert Dates Jo Anna Excel Worksheet Functions 6 September 8th 06 11:31 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM


All times are GMT +1. The time now is 12:00 AM.

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"