Conversion of cumulate day of the year and year into Date/Month/Year

3 views (last 30 days)
Nerma Caluk
Nerma Caluk on 24 Jun 2022
Answered: Star Strider on 24 Jun 2022
If I have a date in format, for example; 344th day of 1970, how to covert it to Day/Month/Year format (datetime)?

Answers (1)

Star Strider
Star Strider on 24 Jun 2022
The datetime function is remarkably robust (more so that I previously appreciated)!
Try this —
D = datetime(1970,1,344)
D = datetime
Check = day(D,'dayofyear') % Check
Check = 344





Community Treasure Hunt

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

Start Hunting!