Computer Learning Zone CLZ Access Excel Word Windows

Ignorance is a virus. Once it starts spreading, it can only be cured by reason. For the sake of humanity, we must be that cure.

-Neil deGrasse Tyson
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Excel Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Convert numbers into date time values
Wayne S. 

14 years ago
I do a lot of time calculating that involves start time subtracted from stop time. Example: start - 9:00, stop - 10:15. Is there any way I can just enter the time as straight numbers instead of always having to use the colin? I am currently using use Excel 2003. Soon to be using Excel 2010.


Reply from Richard Rost:

Sure. Here's what I would do. In column A enter your times as numbers. Now, this example assumes that you'll type in times as either 3 or 4 digit values, like this:

130
1245
1730
250
2100

Now in column B we can use some function trickery to convert that into DATE/TIME values, based on the number of characters in each value (3 or 4):

=IF(LEN(A1)=3,TIME(LEFT(A1,1),RIGHT(A1,2),0),TIME(LEFT(A1,2),RIGHT(A1,2),0))

Basically this says: IF there are 3 characters in the time, then set the hour equal to the leftmost character, the minute equal to the right 2 characters, and the seconds to 0. OTHERWISE, the hour is the left 2 characters, the minute is the right 2 characters. I cover the IF function in Excel Expert Level 3.

The TIME function takes individual components (hour, minute, second) and builds an actual DATE/TIME value out of it. I cover this function (and the other date/time functions) extensively in Excel Expert Level 2.

Now you're left with a series of date/time values but remember that Excel stores dates as a number of DAYS, so your column B now looks like this:

0.0625
0.53125
0.729166667
0.118055556
0.875

That's OK. That's exactly what is expected. Now just right-click on the column header and select Format Cells > Time > and pick the "01:30" time format.

There you go.

1:30
12:45
17:30
2:50
21:00

Hope this helps. (Hmmm... this would make a nice mini video tutorial. I'll have to add it to my list).

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Excel Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/17/2026 3:23:24 AM. PLT: 1s