Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Pam
 
Posts: n/a
Default Convert date/time to text

An automatically generated report has a column of dates/times in the format:
mm/dd/yyyy hh:mm:ss AM

We want to be able to sort this column ONLY by the times. We don't care
about the date. When we change the format of the cells to contain only the
time, the sort sorts by the entire date/time (because we never really changed
the contents of the cells).

So, basically what I want to do is 'strip out' the date information, leaving
only the time information. Any ideas?


  #2   Report Post  
Posted to microsoft.public.excel.misc
Sarah_Lecturer
 
Posts: n/a
Default Convert date/time to text

Hilight the column
Click on Data
Text to columns
Clicked next
Tick "Space"
Click next
Click Finish

Sort as required x

"Pam" wrote:

An automatically generated report has a column of dates/times in the format:
mm/dd/yyyy hh:mm:ss AM

We want to be able to sort this column ONLY by the times. We don't care
about the date. When we change the format of the cells to contain only the
time, the sort sorts by the entire date/time (because we never really changed
the contents of the cells).

So, basically what I want to do is 'strip out' the date information, leaving
only the time information. Any ideas?


  #3   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Convert date/time to text

Hi

You could use a helper column with =MOD(A2,1) in it and sort on that.

Hope this helps.
Andy.

"Pam" wrote in message
...
An automatically generated report has a column of dates/times in the
format:
mm/dd/yyyy hh:mm:ss AM

We want to be able to sort this column ONLY by the times. We don't care
about the date. When we change the format of the cells to contain only the
time, the sort sorts by the entire date/time (because we never really
changed
the contents of the cells).

So, basically what I want to do is 'strip out' the date information,
leaving
only the time information. Any ideas?




  #4   Report Post  
Posted to microsoft.public.excel.misc
Pam
 
Posts: n/a
Default Convert date/time to text

I had great luck with separating the date/time using Text/Columns. (Thanks!)
But now my problem is that the time is 1:00:00 and to get the sort to work
correctly I would need it to display 01:00:00. I need the leading "0", so all
of the text I am sorting has the same amount of characters.

Any ideas on that??

"Sarah_Lecturer" wrote:

Hilight the column
Click on Data
Text to columns
Clicked next
Tick "Space"
Click next
Click Finish

Sort as required x

"Pam" wrote:

An automatically generated report has a column of dates/times in the format:
mm/dd/yyyy hh:mm:ss AM

We want to be able to sort this column ONLY by the times. We don't care
about the date. When we change the format of the cells to contain only the
time, the sort sorts by the entire date/time (because we never really changed
the contents of the cells).

So, basically what I want to do is 'strip out' the date information, leaving
only the time information. Any ideas?


  #5   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default Convert date/time to text

"Pam" wrote in message
...
An automatically generated report has a column of dates/times in the
format:
mm/dd/yyyy hh:mm:ss AM

We want to be able to sort this column ONLY by the times. We don't care
about the date. When we change the format of the cells to contain only the
time, the sort sorts by the entire date/time (because we never really
changed
the contents of the cells).

So, basically what I want to do is 'strip out' the date information,
leaving
only the time information. Any ideas?


=MOD(A1,1)
--
David Biddulph




  #6   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default Convert date/time to text

"Pam" wrote in message
...

"Sarah_Lecturer" wrote:


"Pam" wrote:

An automatically generated report has a column of dates/times in the
format:
mm/dd/yyyy hh:mm:ss AM

We want to be able to sort this column ONLY by the times. We don't care
about the date. When we change the format of the cells to contain only
the
time, the sort sorts by the entire date/time (because we never really
changed
the contents of the cells).

So, basically what I want to do is 'strip out' the date information,
leaving
only the time information. Any ideas?


Hilight the column
Click on Data
Text to columns
Clicked next
Tick "Space"
Click next
Click Finish

Sort as required x



I had great luck with separating the date/time using Text/Columns.
(Thanks!)
But now my problem is that the time is 1:00:00 and to get the sort to work
correctly I would need it to display 01:00:00. I need the leading "0", so
all
of the text I am sorting has the same amount of characters.

Any ideas on that??


Custom format hh:mm:ss
--
David Biddulph


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 excel file into ASCII text file with alignment? Rosaiah Excel Discussion (Misc queries) 2 June 27th 05 12:17 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Convert excel file to flat text file Gary's Student Excel Discussion (Misc queries) 0 June 1st 05 12:17 AM
How to convert columns of data to one column of text devlkat Excel Worksheet Functions 3 April 6th 05 04:08 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM


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