current date and time

188 visualizzazioni (ultimi 30 giorni)
Leonardo Wayne
Leonardo Wayne il 21 Giu 2016
Commentato: Shameer Parmar il 21 Giu 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?

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Dates and Time in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by