datenum2datetime(T, vars)

버전 1.0.0.0 (3.39 KB) 작성자: Julian
Convert numeric datenum array, or given columns of table or dataset, to new datetime class
다운로드 수: 390
업데이트 날짜: 2015/2/13

라이선스 보기

Until now, like many others I guess, I represent time in MATLAB with serial datenum doubles, many examples of which I already have saved in dataset arrays in MAT files. This function helps migrate data into the welcome new datetime class that ships in MATLAB since R2014b.
I wrote it for several reasons:
Firstly I already have my own subclass of double ("timestamp") which was a very rudimentary attempt by me to get some of the behaviour that the new datetime class has. Mostly I just wanted to display the times in readable way, while still being able to calculate on them. This function allows me to convert my old class.
The improved precision of datetime over datenum leads to apparent disagreement in display of times, which is confusing.
I want to exchange datenum variables in dataset arrays into datetime so I can actually read them!
I extended this to the new table class too - (new to me as I have extensive use of dataset arrays).

인용 양식

Julian (2024). datenum2datetime(T, vars) (https://www.mathworks.com/matlabcentral/fileexchange/49700-datenum2datetime-t-vars), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0