Converting numeric elements to date
Show older comments
I have converted date to serial number:
A= 10-Jan-2000
D = datenum(A)
D = 730495
And after doing some operation, I want to change (D) it back to the date format. But could not.
Is there any function to convert serial number to date format?
Accepted Answer
More Answers (1)
Ameer Hamza
on 30 Sep 2020
Edited: Ameer Hamza
on 30 Sep 2020
A = '10-Jan-2000';
D = datenum(A);
D = D + 10;
B = datestr(D);
Result
>> B
B =
'20-Jan-2000'
1 Comment
Milad Naderloo
on 30 Sep 2020
Categories
Find more on Dates and Time 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!