Why do I get an error when I specify date as one of the override options in HISTORY function in Datafeed Toolbox 4.2(R2011b)?
조회 수: 6 (최근 30일)
이전 댓글 표시
I am trying to use the blp/history function to define the override option 'BETA_OVERRIDE_START_DT'.
The date string that I have specified, '20120319', works with getdata.
For example,
d = getdata(c,'AC* MM Equity','BETA_ADJ_OVERRIDABLE',{'BETA_OVERRIDE_REL_INDEX','BETA_OVERRIDE_START_DT'},{'MEXBOL Index','20120319'});
However, when I use the same date string with the HISTORY function I get the error:
Cannot convert input into specified date string.
I am using the HISTORY function in the following manner:
d = history(c,'AC* MM Equity','BETA_ADJ_OVERRIDABLE',overrideOption2)
Where overrideOption2 is...
'BETA_OVERRIDE_REL_INDEX' 'MEXBOL Index'
'BETA_OVERRIDE_START_DT' '20120319'
Why do I get this particular error with HISTORY function?
채택된 답변
MathWorks Support Team
2013년 3월 29일
The error is thrown in MATLAB because the date format '20120319' is not a recognized format in MATLAB.
You can use the DATENUM function to specify the format of the date via the following code:
datenum('19.03.2012','dd.mm.yyyy')
Replace '20120319' with the above command.
MATLAB will accept the first argument as a date string represented in a format specified by the second argument.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Preprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!