Formula to format Time Punch

nhawkins

New Member
Joined
Jan 22, 2018
Messages
3
Hi,

I am trying to re-format a time punch into a new date column using a formula.

Currently there is a date column in the following format:
01/01/17

<tbody>
</tbody>

There is another column in the sheet with the clock in times which does not have the date in the proper format (example of dates shown below):
158
0917
2042

<colgroup><col></colgroup><tbody>
</tbody>

I would like to create a new column which combines both into the excel date formatting so I can input it into a different template.

Thanks so much for your help!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi - welcome to the board.

Could you indicate what dates those values are meant to represent?
 
Upvote 0
Hi - welcome to the board.

Could you indicate what dates those values are meant to represent?


Thank you!
These are the times people clock in
158 = 1:58 AM
0917= 09:17 AM
2042 = 8:42 PM

The dates are housed in another column and id like to combine them into one column but am having difficulty with there being no : to separate hours and minutes :?

Thanks again!
 
Upvote 0
Hi,

You can do one of these,

Formula in D1 will convert your A1 and B1 data to show the way you want, BUT it's result is TEXT.
Formula in F1 will convert your A1 and B1 data and give you a NUMBERIC result so you can do further calculations with in, but you'll have to custom FORMAT the cell to: mm/dd/yy hh:mm AM/PM


Book1
ABCDEFGHIJ
101/01/1715801/01/17 01:58 AM01/01/17 01:58 AMFALSETRUE
201/02/17091701/02/17 09:17 AM01/02/17 09:17 AM
301/03/17204201/03/17 08:42 PM01/03/17 08:42 PM
Sheet19
Cell Formulas
RangeFormula
H1=ISNUMBER(D1)
J1=ISNUMBER(F1)
D1=TEXT(A1,"mm/dd/yy")&" "&TEXT(LEFT(B1,LEN(B1)-2)&":"&RIGHT(B1,2),"hh:mm AM/PM")
F1=A1+TEXT(LEFT(B1,LEN(B1)-2)&":"&RIGHT(B1,2),"hh:mm AM/PM")
 
Upvote 0
Hi,

You can do one of these,

Formula in D1 will convert your A1 and B1 data to show the way you want, BUT it's result is TEXT.
Formula in F1 will convert your A1 and B1 data and give you a NUMBERIC result so you can do further calculations with in, but you'll have to custom FORMAT the cell to: mm/dd/yy hh:mm AM/PM

ABCDEFGHIJ
101/01/1715801/01/17 01:58 AM01/01/17 01:58 AMFALSETRUE
201/02/17091701/02/17 09:17 AM01/02/17 09:17 AM
301/03/17204201/03/17 08:42 PM01/03/17 08:42 PM

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet19

Worksheet Formulas
CellFormula
H1=ISNUMBER(D1)
J1=ISNUMBER(F1)
D1=TEXT(A1,"mm/dd/yy")&" "&TEXT(LEFT(B1,LEN(B1)-2)&":"&RIGHT(B1,2),"hh:mm AM/PM")
F1=A1+TEXT(LEFT(B1,LEN(B1)-2)&":"&RIGHT(B1,2),"hh:mm AM/PM")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

This worked great! Thank you so so much!!
 
Upvote 0
You're welcome, welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,760
Members
449,095
Latest member
m_smith_solihull

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