How to I convert this time format to datetime?
Show older comments
I got this strange time format: my str ='Fri May 28 18:15:46 +0000 2021'.
I would be very happy if I could get it down to '28-May-2021 18:15:46'.
Tried messing with datetime(), but with no luck
Thank in advance
Accepted Answer
More Answers (1)
str ='Fri May 28 18:15:46 +0000 2021'
datetime(str, 'inputformat', 'eee MMM dd HH:mm:ss Z yyyy','timezone','utc')
2 Comments
Tota
on 10 Jan 2023
i have millscond (gaze time stamp) but need convert to time hh:mm:ss
if can help

GazeTimestamp = [1535.81; 169225; 1614.36; 1254.72]
D = seconds(GazeTimestamp ./ 1000);
D.Format = 'hh:mm:ss'
Categories
Find more on Data Type Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!