current date and time

150 visualizaciones (últimos 30 días)
Leonardo Wayne
Leonardo Wayne el 21 de Jun. de 2016
Comentada: Shameer Parmar el 21 de Jun. de 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?

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by