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

 Accepted Answer

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

More Answers (0)

Categories

Tags

Asked:

on 21 Aug 2018

Answered:

dpb
on 21 Aug 2018

Community Treasure Hunt

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

Start Hunting!