# convert date and time text to 2 cells

#### Jbooze

##### Board Regular
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

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### AlphaFrog

##### MrExcel MVP
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
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>
 2.01309e+07

<tbody>
</tbody>
 6100.1

<tbody>
</tbody>
 64200

<tbody>
</tbody>
 2.01309e+07

<tbody>
</tbody>
 6100.05

<tbody>
</tbody>
 139700

<tbody>
</tbody>

<tbody>
</tbody>

Thanks

#### AlphaFrog

##### MrExcel MVP
Format the cells in columns B and C with any Date and Time formats you like.

<br />
Book1
ABC
120130919.0916189/19/20139:16:18
220130919.0916199/19/20139:16:19
320130919.0916269/19/20139:16:26
Sheet1
Cell Formulas
RangeFormula
B1=DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2))
C1=TIME(MID(A1,10,2),MID(A1,12,2),MID(A1,14,2))

#### taprico

##### New Member
Wow thats perfect ALPHAFROG - thanks man I have been breaking my head over this for quite a few days now.

Thanks man

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,681
Messages
5,838,750
Members
430,567
Latest member
carid

### 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.

### Which adblocker are you using?

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

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