How do I write code to store the data in a textbox using the format (dd/mm/yyyy) the same image as shown.?.

1 次查看(过去 30 天)
set(handles.DateFind,'String',cellstr(datestr(format, ' -/--/----')));

采纳的回答

dpb
dpb 2018-8-21
set(handles.DateFind,'String',datestr(setDate, 'dd/mm/yyyy'));
where setDate is your datenum value.
I'd suggest not using the outdated (so to speak :) ) datenum but use datetime instead; then you set the desired .Format property for the variable and just use cellstr(setDate)
setDate.Format='dd/MM/uuuu'; % NB: different encoding than datenum with datetime

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Time Series Objects 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by