Forum Discussion
dirkjs
7 years agoFrequent Visitor
Incorrect syntax for DATETIME
I get an incorrect syntax error for the DATETIME strings in the example below: CustomFiscalPeriods = DATATABLE ( "Fiscal YearNumber", INTEGER, "FirstDayOfYear", DATETIME, "LastDayOfYear", DATE...
v-lili6-msft
7 years agoCommunity Support
hi, dirkjs
If it is the format error as below:
CustomFiscalPeriods =
DATATABLE (
"Fiscal YearNumber", INTEGER,
"FirstDayOfYear", DATETIME,
"LastDayOfYear", DATETIME,
{
{ 2016, "28-06-2015", "2016-07-02" },
{ 2017, "2016-07-03", "2017-07-01" },
{ 2018, "2017-07-02", "2018-06-30" },
{ 2019, "2018-07-01", "2019-06-29" }
}
)
Please adjust it as below, then it should work well.
Table =
DATATABLE (
"Fiscal YearNumber", INTEGER,
"FirstDayOfYear", DATETIME,
"LastDayOfYear", DATETIME,
{
{ 2016, "2015-06-28", "2016-07-02" },
{ 2017, "2016-07-03", "2017-07-01" },
{ 2018, "2017-07-02", "2018-06-30" },
{ 2019, "2018-07-01", "2019-06-29" }
}
)
Result:
Best Regards,
Lin