how do i get the set the current time as a datenum

i need to create an app that compares the current time to a given time

回答 (1 件)

Arif Hoq
Arif Hoq 2022 年 2 月 23 日

0 投票

t = datetime('now','TimeZone','local','Format','d-MMM-y HH:mm:ss Z') % current time
t = datetime
23-Feb-2022 08:25:13 +0000
datenum(t) % datenumber
ans = 7.3858e+05

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

製品

質問済み:

2022 年 2 月 23 日

回答済み:

2022 年 2 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by