Date from timestamp string

bertilak

New Member
Joined
Jun 5, 2019
Messages
17
I have a device for reading blood pressure. For each reading it reports (along with blood pressure numbers) a timestamp in the format:
Jun 16 2019 06:01:44​

I want to extract just the date part (Jun 16 2019) which I will then convert to an excel date number (e.g. 43626).

How can I do this? Can it be done without VBA? I have a VBA solution but it causes Excel to ask me if I want to save changes every time I exit since it re-does that calculation every time even if nothing has changed. (At least I think that's why.)
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi
can you not just change the format to show date only, not date and time?
 
Upvote 0
Give this formula a try...

=DATEVALUE(SUBSTITUTE(A1," ",", ",2))

Note: I was not sure from your single example whether dates with single digit day numbers are shown with or without leading zeros. The above formula works no matter what, but if your day numbers will always have a leading zero, you could use this formula which I think may be more efficient...

=DATEVALUE(REPLACE(A1,7,0,", "))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,979
Messages
6,122,560
Members
449,089
Latest member
Motoracer88

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