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
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time Series Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!