Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date and time formats 2

Status
Not open for further replies.

hopelessliar

Technical User
Apr 29, 2002
89
GB
I have a cell whose contents are:

17/03/2003 18:13:51

What I want to be able to do is lose the date part of the information, leaving just the time. Obviuosly it's simple to display just the time, but I want to be able to sort by time and at the moment I can't. Anyone have any ideas?

 
If you have a date/time in A1 then
=A1 - INT(A1)

will leave you with just the time portion as the time within a day is based on 1 day = 1 therefore 1 hour = 1/24 etc etc - time is represented as a fraction of 1 - therefore, just reove the integer part of date / time and you remove the date, leaving only the time

Rgds, Geoff
Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?
Want the best answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top