convert from datenum to a date
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (2)
Rica
il 15 Nov 2012
Andreas Svedin
il 5 Lug 2016
0 voti
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 Commenti
Peter Perkins
il 3 Ago 2016
Or more directly: datetime(dates,'ConvertFrom','datenum')
Fercho_Sala
il 16 Apr 2021
@Peter Perkins good answer, but it does't separe in one colum dates and in other column hours, how do you do it?
Categorie
Scopri di più su Dates and Time in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!