Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Converting dates to different formats

I get an exported file with the date and time column as follows:

6/12/2009 9:01:00 AM (all in one cell)

Is there a way to convert this to just 6/12/2009?

Also how would you convert to just the month?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Converting dates to different formats

There are two cases:

1. if the data is a genuine Excel date/time, then just format the cell to:
Custom mm/dd/yyyy

2. if the data is only a text string then use the formula:
=LEFT(A1,LEN(A1)-FIND(" ",A1)-2)

--
Gary''s Student - gsnu200902


"Nelson B." wrote:

I get an exported file with the date and time column as follows:

6/12/2009 9:01:00 AM (all in one cell)

Is there a way to convert this to just 6/12/2009?

Also how would you convert to just the month?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Converting dates to different formats

Insert three new columns to the right of this data
Select the column of values
Use Data | Text-to-Column; specify delimited by space; click Next
For the first field specify DMY or MDY as needed (not clear from your
example); click OK
Delete unrequited columns
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Nelson B." wrote in message
...
I get an exported file with the date and time column as follows:

6/12/2009 9:01:00 AM (all in one cell)

Is there a way to convert this to just 6/12/2009?

Also how would you convert to just the month?

Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Converting dates to different formats

Well€¦.
Considering the data is in single column and same format always with same
spacing€¦.

Process: Select the number of cells or data in couln and Go to Data in Menu
Bar--- Text to Columns---- Fixed width---- next--- check that the line
appears after the date and before the time---- Next ----- Date column should
be highlighted---- Go to Column data Format---- Select date and format(MDY or
DMY and so on) you wish to have------ now select the 2nd column besides
date--- go to column format--- select do not import column i.e. skip ------
and repeat the same for the 3rd column if any----- Now click finish---- you
should have what you want€¦€¦

If the dat is in not in same spacing than use delimited format instead of
Fixed width and click space for separator and uncheck everything else€¦. And
follow almost the same procdure€¦


Hope that is what you want€¦
If it helps€¦. Please click yes below€¦..


"Nelson B." wrote:

I get an exported file with the date and time column as follows:

6/12/2009 9:01:00 AM (all in one cell)

Is there a way to convert this to just 6/12/2009?

Also how would you convert to just the month?

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default Converting dates to different formats

Hi Nelson B.,

as far as 1st part of your questionis concerned, it is not clear whether u
are referencing the said cell elsewhere or not. If u r not using this cell
elsewhere then may be just formatting the cell as "dd/mm/yyyy" either in
date category or in general category will do the needful (eventhough it will
show the entire & actual contents of the cell in the formula bar, but only
date will be shownin the cell).

as regards second part of your question, u can also use the following
formula in the other column
=TEXT(celladdress,"mmmm")

click yes below, if it helps

"Nelson B." wrote:

I get an exported file with the date and time column as follows:

6/12/2009 9:01:00 AM (all in one cell)

Is there a way to convert this to just 6/12/2009?

Also how would you convert to just the month?

Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Converting dates to different formats

Wow that was easy! I hadn't even thought of changing the format of the
column! Thanks to all for your help.

"Gary''s Student" wrote:

There are two cases:

1. if the data is a genuine Excel date/time, then just format the cell to:
Custom mm/dd/yyyy

2. if the data is only a text string then use the formula:
=LEFT(A1,LEN(A1)-FIND(" ",A1)-2)

--
Gary''s Student - gsnu200902


"Nelson B." wrote:

I get an exported file with the date and time column as follows:

6/12/2009 9:01:00 AM (all in one cell)

Is there a way to convert this to just 6/12/2009?

Also how would you convert to just the month?

Thanks!

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
Converting time formats in Excel Darrin Excel Discussion (Misc queries) 4 June 11th 09 06:17 PM
Converting date formats Diana G. Excel Discussion (Misc queries) 3 March 14th 07 09:29 PM
Help with converting date formats k3639 Excel Worksheet Functions 7 July 27th 06 11:21 PM
Converting US Dates to UK Formats Matt Excel Worksheet Functions 4 July 13th 06 02:52 PM
Converting date formats arem Excel Discussion (Misc queries) 2 February 14th 06 03:48 PM


All times are GMT +1. The time now is 11:09 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"