How to split multiple numbers which is one number from data file?

202021031200
this is has year date and time, how do I split the numbers into year date and time?

Answers (1)

D = 202021031200;
T = datetime(string(D), 'InputFormat', 'uuuuddMMHHmm')
T = datetime
21-Mar-2020 12:00:00

Categories

Products

Release

R2022b

Asked:

on 15 Oct 2022

Answered:

on 15 Oct 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!