Copy portion of cell involving date and time

lilmish

New Member
Joined
Oct 12, 2016
Messages
1
Cell A1 contains the following: 6/6/2012 4:00:00 PM

The formatting of Cell A1 is custom m/d/yy h:mm

I would like to paste only the 4:00:00 PM portion of cell A1 into a new cell

I understand generally the concept of string functions, but have not had much experience using them and can't seem to figure this out.

Any help would be much appreciated!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I understand generally the concept of string functions, but have not had much experience using them and can't seem to figure this out.
The reason why you cannot use String functions on it is because it is not a string entry, but rather a numeric entry with a date format.
In Excel, all dates and times are stored as numbers, specifically, the number of days since 1/1/1900 (time is just a fractional portion of one day).
If you take any valid date/time entry, and change the format to "General", you will see it as Excel sees it. And this is the value that any String functions would run against.

The TEXT function converts the entry from a valid date/time entry to a text entry, in the specified format. Note that the result of using the function is a TEXT value. So any date/time functions or math would not work against it.

Note that you could simply copy the value to another cell and just apply a Custom Format of h:mm:ss AM/PM on it to just show the time. It would still retain the whole date/time value, but just show the time piece. The advantage to this method is that it is still a valid date/time function, so you can still apply date/time/math functions to it, if needed.
 
Upvote 0
If you only want the time portion, irrespective of the date try:

=MOD(A1,1)

and format the formula cell as Time.
 
Upvote 0

Forum statistics

Threads
1,223,919
Messages
6,175,371
Members
452,638
Latest member
Oluwabukunmi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top