Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vass
 
Posts: n/a
Default Date format problem

I have imported a csv file and the date is in US format like this
20060330 without slashes or stops separating yyyy/mm/dd

Any idea how I get this now to read UK format dd/mm/yyyy with slashes ?

thanks

--
Vass


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rossella
 
Posts: n/a
Default Date format problem

try this..

=CONCATENATE(STRING.extract(F7;7;2);"/";STRING.extract(F7;5;2);"/";STRINg.extract(F7;1;4))

f7 is where you've put 20060330

I don't know if the function names are right since I use excel in
Italian

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vass
 
Posts: n/a
Default Date format problem

=DATEVALUE((RIGHT(+O3,2))&"/"&(MID(+O3,5,2))&"/"&(LEFT(O3,4)))

this sorted it thanks

--
Vass


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Date format problem

On 3 Apr 2006 06:34:26 -0700, "Rossella" wrote:

try this..

=CONCATENATE(STRING.extract(F7;7;2);"/";STRING.extract(F7;5;2);"/";STRINg.extract(F7;1;4))

f7 is where you've put 20060330

I don't know if the function names are right since I use excel in
Italian


Constructing a text string with slashes causes the conversion to be dependent
on the Windows Regional Settings.

Using the DATE function is much less ambiguous.


--ron
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default Date format problem

Here's an alternative:

=VALUE(RIGHT(A1,2)&"/"&MID(A1,5,2)&"/"&LEFT(A1,4))

assuming the data is in cell A1. Format as date with your required
format and copy down. Incidentally, I don't think this is US format -
this format ensures that there are always 8 digits and that no leading
zeroes are missed (which is what would happen if you had 03042006, for
example).

Hope this helps.

Pete



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Date format problem

On Mon, 3 Apr 2006 14:19:10 +0100, "Vass" wrote:

I have imported a csv file and the date is in US format like this
20060330 without slashes or stops separating yyyy/mm/dd

Any idea how I get this now to read UK format dd/mm/yyyy with slashes ?

thanks


If your imported date is in F1, then:

=DATE(LEFT(F1,4),MID(F1,5,2),RIGHT(F1,2))

Format the cell as UK format:

Format/Cells/Custom Type: dd/mm/yyyy


--ron
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vass
 
Posts: n/a
Default Date format problem

"Vass" wrote in message
. uk...
I have imported a csv file and the date is in US format like this
20060330 without slashes or stops separating yyyy/mm/dd


thanks for help folks !!
--
Vass


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default Date format problem

You can use Data-Text to Columns to automatically convert a whole column.

Select Data-Text to Columns
Select Delimited, and then next
Deselect all delimiters (this way it won't split up your cells)
Select Date and choose YMD (for year, month, day) and click finish.
This will convert any series of numbers (like 20060330) in that column to a
date. You can then change the date format to a normal date format. A custom
format of
dd/mm/yyy
will show the dates how you want them.

"Vass" wrote:

I have imported a csv file and the date is in US format like this
20060330 without slashes or stops separating yyyy/mm/dd

Any idea how I get this now to read UK format dd/mm/yyyy with slashes ?

thanks

--
Vass



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
Date format default problem Hood Excel Worksheet Functions 5 November 21st 05 03:52 PM
format date in excel Nigel Excel Discussion (Misc queries) 2 September 15th 05 09:52 PM
Why Does Date Format Change on Chart John Taylor Excel Discussion (Misc queries) 0 September 11th 05 08:16 AM
format the "date" button for a header sc11 Excel Discussion (Misc queries) 1 May 12th 05 03:48 AM
How to format a date to a different format Laura Excel Discussion (Misc queries) 1 March 5th 05 09:59 PM


All times are GMT +1. The time now is 09:38 AM.

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

About Us

"It's about Microsoft Excel"