convert from datenum to a date
Mostrar comentarios más antiguos
Hi,
is ther any function which convert the serial number from the function (detenum) to the original date like .
I have a vector of date and time and i converted it with datenum. I made a plot of another variable with the date_time vector. i get just the serial number.
thnks
Respuesta aceptada
Más respuestas (2)
Rica
el 15 de Nov. de 2012
Andreas Svedin
el 5 de Jul. de 2016
0 votos
If you use "datenum" on a datetime array and want to get it converted back to datetime use the command below. It seem to work
"datetime(datestr(dates))"
2 comentarios
Peter Perkins
el 3 de Ag. de 2016
Or more directly: datetime(dates,'ConvertFrom','datenum')
Fercho_Sala
el 16 de Abr. de 2021
@Peter Perkins good answer, but it does't separe in one colum dates and in other column hours, how do you do it?
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!