Converting numeric elements to date
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
Ameer Hamza
el 30 de Sept. de 2020
Editada: Ameer Hamza
el 30 de Sept. de 2020
A = '10-Jan-2000';
D = datenum(A);
D = D + 10;
B = datestr(D);
Result
>> B
B =
'20-Jan-2000'
1 comentario
Milad Naderloo
el 30 de Sept. de 2020
Categorías
Más información sobre Dates and Time en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!