convert date and time text to 2 cells

Jbooze

Board Regular
Joined
Sep 1, 2005
Messages
59
I have an import that includes the date and time as one string 2013/04/16/00. The would be the date of 4/16/2013 and the time of 0:00. I can pull the date out with:

=DATE(LEFT('Chat Split Skill Summary'!B5,4), MID('Chat Split Skill Summary'!B5,6,2), MID('Chat Split Skill Summary'!B5,9,2))

I need to pull the two digit time out and format it as 00:00. I tried =HOUR(RIGHT('Chat Split Skill Summary'!B5,2)) but it does not recognize the the two digits as the hour. It seems to think it is the minutes. When I drag it down one field to get 01, I still get a value of 0:00.
Can someone get this to recognize the hour?

Thanks,

Jeff
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,400
The HOUR function returns the hours only from a time value. It doesn't make a time value.

Try this...
=TIME(RIGHT('Chat Split Skill Summary'!B5,2),0,0)
 

taprico

New Member
Joined
Feb 7, 2010
Messages
4
Sir

I have a similar problem - I get date and time in a cell that updates from net - the format is YYYYMMDD.HHMMSS

I want the date and time split in two cells - MM/DD/YYYY and HH:MM:SS

I have been searching the site an googling it but no success - I have tried many functions but failed.

Have tried Text to Column function but as there are decimals in other cells so it dosent work. Then in others the '0' disappears from the time value.

Kindly help,

A
20130919.091618

<tbody>
</tbody>
B
6100

<tbody>
</tbody>
C
82750

<tbody>
</tbody>
20130919.091619

<tbody>
</tbody>
6100.1

<tbody>
</tbody>
64200

<tbody>
</tbody>
20130919.091626

<tbody>
</tbody>
6100.05

<tbody>
</tbody>
139700

<tbody>
</tbody>

<tbody>
</tbody>

Thanks
 

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,400
Format the cells in columns B and C with any Date and Time formats you like.

<br /><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="text-align: right;;">20130919.091618</td><td style="text-align: right;;">9/19/2013</td><td style="text-align: right;;">9:16:18</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: right;;">20130919.091619</td><td style="text-align: right;;">9/19/2013</td><td style="text-align: right;;">9:16:19</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: right;;">20130919.091626</td><td style="text-align: right;;">9/19/2013</td><td style="text-align: right;;">9:16:26</td></tr></tbody></table><br /><br /><table cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B1</th><td style="text-align:left">=DATE(<font color="Blue">LEFT(<font color="Red">A1,4</font>),MID(<font color="Red">A1,5,2</font>),MID(<font color="Red">A1,7,2</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C1</th><td style="text-align:left">=TIME(<font color="Blue">MID(<font color="Red">A1,10,2</font>),MID(<font color="Red">A1,12,2</font>),MID(<font color="Red">A1,14,2</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
 

taprico

New Member
Joined
Feb 7, 2010
Messages
4
Wow thats perfect ALPHAFROG - thanks man I have been breaking my head over this for quite a few days now.

Thanks man
 

Watch MrExcel Video

Forum statistics

Threads
1,127,501
Messages
5,625,166
Members
416,075
Latest member
TechJosh

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
Top