current date and time

168 views (last 30 days)
Leonardo Wayne
Leonardo Wayne on 21 Jun 2016
Commented: Shameer Parmar on 21 Jun 2016
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?

Accepted Answer

Shameer Parmar
Shameer Parmar on 21 Jun 2016
datestr(now, 'dd/mm/yy-HH:MM')
  1 Comment
Shameer Parmar
Shameer Parmar on 21 Jun 2016
to display this into GUI field,
date = datestr(now, 'dd/mm/yy-HH:MM');
set(handles.edit,'String',date);

Sign in to comment.

More Answers (0)

Categories

Find more on Dates and Time in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!