Using datetime in R2014a (prior to its introduction in R2014b)

10 ビュー (過去 30 日間)
Erik
Erik 2015 年 11 月 16 日
回答済み: Walter Roberson 2015 年 11 月 16 日
The datetime class was added in MATLAB R2014b. However, the version I'm forced to use on a work computer is R2014a, unfortunately. What are the best practices to use dates and times in this version of MATLAB? I have always used the newest version of MATLAB, so I'm used to datetime, but I can't use it anymore.
Can I copy parts of the datetime class and its accompanying functions from my R2015b installation to the path of my work computer for the functionality to work? Or do I need to write some functions myself that parse strings into relative seconds after a starting date and time an idea? Or something like that? What do you recommend?

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 11 月 16 日
Copying the files would be a violation of the license agreements.
You should use datenum(), datestr(), datevec()
If you need to use leap seconds or you need to automatically take into account timezones and local time, then you will have some challenges.

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by