13 hours ago: Power and Internet are out in my office due to Hurricane Ian. Click for details.
 
Excel 2010-2019
Excel 2007
Excel 2003
Tips & Tricks
Excel Forum
Course Index CIG Excel Book
 
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
 
Excel: Separating Time & Date
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   14 years ago

Q: How do I remove the date from a cell with both the date and time (the date seems to show up automatically, although I'm only interested in the time). In short, I want to go from "4/7/2008 6:18:00 AM" to "6:18:00 AM". Thanks, Lauren.


A: Lauren, the only easy way I've found to do this is to break up the date/time into its components (day, month, year, etc.) and then put them back together again with the DATE() and TIME() functions.

For example, let's say A1 has: 4/7/2008 6:18:00 AM

Put the following functions in the next cells:

B1 = YEAR(A1)
C1 = MONTH(A1)
D1 = DAY(A1)
E1 = HOUR(A1)
F1 = MINUTE(A1)
G1 = SECOND(A1)

Now put them all back together:

H1 = DATE(B1, C1, D1)
I1 = TIME(E1, F1, G1)

That's about the only easy way to do it and still keep the value as a DATE/TIME and not text (you could do it with string concatenation too, but you would then have to convert it back to a date).

Comments for Excel: Separating Time & Date
 
Age Subject From
14 yearsNo SubjectRichard Rost
14 yearsNo SubjectSanat
14 yearsNo SubjectRichard Rost
14 yearsNo SubjectJohn Mosher
14 yearsNo SubjectRichard Rost
14 yearsNo SubjectHiram Hey
14 yearsNo SubjectRichard Rost
14 yearsNo SubjectRichard Rost
14 yearsNo SubjectRuby Kowaney
14 yearsNo SubjectRamon Salvo

 

Start a NEW Conversation
 
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.
 
Subscribe
 

Check out these other pages that may be of interest to you:

9/17/2022Very Hidden
8/11/2022Crosstab
8/10/2022Transpose
7/26/2022Lottery Numbers 2
7/22/2022Lottery Numbers
6/30/2022Sales Chart
6/17/2022Fast AutoSum
2/22/2022ISO Date Format
1/27/2022Work Days
1/11/2022Excel Fast Tips
 
 

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
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
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Keywords: excel tips year month day hour minute second date time  PermaLink  Excel: Separating Time & Date