필터 지우기
필터 지우기

problem to insert date in app.BackTe​stperiodDa​tePicker.V​alue

조회 수: 7 (최근 30일)
Luca Re
Luca Re 2023년 6월 9일
이동: Cris LaPierre 2023년 6월 10일
hi, i want to load in my struct : Settings.StartingDate
>> Settings.StartingDate
ans =
'01-Jan-2022'
i try in werite:
app.BackTestperiodDatePicker.Value=Settings.StartingDate;
but i receive this error:
Error using matlab.ui.control.DatePicker/set.Value
'Value' must be a finite datetime object within the range of 'Limits' or NaT.
Error in PREDATOR/startupFcn (line 82)
app.BackTestperiodDatePicker.Value=Settings.StartingDate;
Error in matlab.apps.AppBase/runStartupFcn (line 68)
ams.runStartupFcn(app, startfcn);
Error in PREDATOR (line 450)
runStartupFcn(app, @startupFcn)

채택된 답변

Cris LaPierre
Cris LaPierre 2023년 6월 10일
이동: Cris LaPierre 2023년 6월 10일
What is the datatype of Settings.StartingDate? It looks like it is a char, not a datetime. What happens if you modify your assignment to this?
app.BackTestperiodDatePicker.Value=datetime(Settings.StartingDate);
If that doesn't fix the issue, what are the limits of your BackTestperiodDatePicker control?

추가 답변 (0개)

카테고리

Help CenterFile 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