Datenum Generating different numbers for same time difference
Ältere Kommentare anzeigen
I have following two date time data points, and I am taking difference of them :
diff_55mins2=abs(datenum('01-04-2017 07:00:00','dd-mm-yyyy HH:MM:SS')-datenum('01-04-2017 07:55:00','dd-mm-yyyy HH:MM:SS'))
diff_55mins1=abs(datenum('01-04-2017 05:00:00','dd-mm-yyyy HH:MM:SS')-datenum('01-04-2017 05:55:00','dd-mm-yyyy HH:MM:SS'))
If you see, both the above code lines are trying to find difference between two date time stamp. The difference is 55 minutes for the both, however after conversion using datenum, there is difference in the numbers as following:
diff_55mins2 =
0.038194444496185
diff_55mins1 =
0.038194444379769
Why there is such difference? They are essentially corresponding to 5 minutes difference in time. Can anyone please explain it.
Thankyou in advance!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Dates and Time finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!