convert from datenum to a date
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Akzeptierte Antwort
Jan
am 15 Nov. 2012
Bearbeitet: Jan
am 15 Nov. 2012
Please post any details. What format does "the original date" have? What does "I made a plot" exactly mean and where do you want the "date" to appear?
The command datestr and datevec convert datenum values to other date formats. The command datetick writes nice dates instead of serial date numbers to the ticklables of axes.
0 Kommentare
Weitere Antworten (2)
Andreas Svedin
am 5 Jul. 2016
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 Kommentare
Fercho_Sala
am 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?
Siehe auch
Kategorien
Mehr zu Dates and Time finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!