Converting numeric elements to date
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (1)
Ameer Hamza
le 30 Sep 2020
Modifié(e) : Ameer Hamza
le 30 Sep 2020
A = '10-Jan-2000';
D = datenum(A);
D = D + 10;
B = datestr(D);
Result
>> B
B =
'20-Jan-2000'
1 commentaire
Milad Naderloo
le 30 Sep 2020
Catégories
En savoir plus sur Dates and Time dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!