I would like to view the time of the day and date in the following format example (21/06/16-11:32) in a GUI. What is the command?

 采纳的回答

datestr(now, 'dd/mm/yy-HH:MM')

1 个评论

to display this into GUI field,
date = datestr(now, 'dd/mm/yy-HH:MM');
set(handles.edit,'String',date);

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File 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