Convert timestamp format to DD/MM/YYY

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
795
Office Version
  1. 365
Platform
  1. MacOS
Hi,

I have a Strava .csv file, and the timestamp column's format is: 'Jan 6, 2011, 3:59:27 PM'. I'd like to convert this to a simple 'DD/MM/YYYY' (06/01/2011).

I have been able to do this with a large amount of fiddling, adding and deleting columns and doing conversions / formulas etc., but I just wonder is there a single formula that I could use to achieve this?

Thanks in advance!

Olly.
 
You are welcome.
Glad we were able to help!
Ahhh, sorry I get an error in my worksheet. Please see image.
Screenshot 2024-11-15 at 13.32.53.png


The format is correct:
Screenshot 2024-11-15 at 13.34.59.jpg
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Do you have any special characters in there, possibly?

Try doing just the TEXTBEFORE part, and see what it returns:
Excel Formula:
=TEXTBEFORE(B2,",",2)
 
Upvote 0
Do you have any special characters in there, possibly?

Try doing just the TEXTBEFORE part, and see what it returns:
Excel Formula:
=TEXTBEFORE(B2,",",2)
Yeah, that works fine

Screenshot 2024-11-15 at 13.38.21.png


Can't see any leading, trailing or double spaces etc.
 
Upvote 0
Hmmm, are you possibly using an English version of Excel?
I wonder if the Regional Date settings are coming into play here (I am in the US).

What does the following return?
Excel Formula:
=DATEVALUE("May 26, 2011")
If that returns the #VALUE error, then it is probably because based on your Regional Date settings, that does not look like a date to Excel (where it does on my system).

What is the acceptable long date structure on your system?
 
Upvote 0
If you go to the Control Panel on your computer, and bring up the Clock and Region settings, and go to Region settings, what does it look like?
This what mine looks like:

1731678327963.png
 
Upvote 0
If you Google "where to find regional date settings on office for mac", a bunch of suggestions come up.
 
Upvote 0
Hmmm... That only shows the short date format.
If you were to write out the month (i.e. "May") instead of using the month number (5), how would you enter into your Excel so that Excel accepts and recognizes it as a date?
 
Upvote 0
@ollyhughes1982 put the formula in as per below

Book2
AB
1aaabbb
2Jan 6, 2011, 3:59:27 PMJan 6 2011
Sheet8
Cell Formulas
RangeFormula
B2B2=SUBSTITUTE(TEXTBEFORE(A2,",",2),",","")


Select Column B and Copy - paste as values

then

  • Select column B
  • Data tab
  • Text to Columns
  • Delimited
  • Next
  • Make sure all the checkboxes are cleared
  • Next
  • Select Date checkbox
  • Select the MDY option (yes MDY as you want the source format)
  • Click Finish
  • Format the cells as desired
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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