datevec output in 24H format

15 次查看(过去 30 天)
cl254
cl254 2016-4-22
Hi All,
I found out that the output of datevec function is in 12-hour format. How to turn it into 24-hour format?
Thank you.

回答(1 个)

Star Strider
Star Strider 2016-4-22
You can easily specify the format with the format string you want.
From the documentation:
'HH:MM:SS' 15:45:17
'HH:MM:SS PM' 3:45:17 PM
'HH:MM' 15:45
'HH:MM PM' 3:45 PM

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by