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

 采纳的回答

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 个)

类别

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