A Formula to Extract Dates and Times

14eichenwalda

New Member
Joined
Jun 27, 2013
Messages
5
Hello! Thank you for looking this over. I appreciate it.

I have a large number of files in the following format: 943291169-20100419_201417. That is, unimportantnumbers-date_time. I'd like to pull the date and time out of that name without having to go through the files one at a time and place them into new cells. I'd like to have one column of cells for date and one for time.

I asked a similar question a few months ago and got a fantastic response. However, I'm not sure how to alter the formulas I recieved to the new format (My older files were in the format Location_Date_Time [BUBL_20130808_194941_000])

The old formulas were =0+TEXT(MID(A1,FIND("_",A1)+1,8),"0000-00-00") for the date and =0+TEXT(MID(A1,LEN(A1)-9,6),"00\:00\:00") for the time.

Thanks again! I look forward to your response.
[TABLE="width: 64"]
<colgroup><col width="64"></colgroup><tbody>[TR]
[TD="width: 64"][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 64"]
<colgroup><col width="64"></colgroup><tbody>[TR]
[TD="width: 64"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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