I want to convert from milliseconds to a date using excell 1904 format

조회 수: 5 (최근 30일)
Dario Furnari
Dario Furnari 2023년 4월 6일
답변: Steven Lord 2023년 4월 6일
so i have a vector of millisecond, and I want to convert in one date. The standard utilizated for caught this time is the excell 1904, there exsist something that convert it automaticalli on matlab ?

답변 (1개)

Steven Lord
Steven Lord 2023년 4월 6일
baseDate = datetime(0, 'ConvertFrom', 'excel1904')
baseDate = datetime
01-Jan-1904
d = baseDate + milliseconds(1e6)
d = datetime
01-Jan-1904 00:16:40
or
d2 = datetime(1e6, 'ConvertFrom', 'epochtime', ...
'Epoch', 'Jan 1, 1904', ...
'TicksPerSecond', 1000)
d2 = datetime
01-Jan-1904 00:16:40

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by