OTBI 문법 관련 - 날짜
1.
Example
For Number of Days between two days:
TimestampDiff(SQL_TSI_DAY, “FROM_DATE_COLUMN”, “TO_DATE_COLUMN”)
For Number of Days till current date:
TimestampDiff(SQL_TSI_DAY, “FROM_DATE_COLUMN”, CURRENT_DATE)
2.
(timestampadd(sql_tsi_day, -(1) ,timestampadd(sql_tsi_month, 1,timestampadd(sql_tsi_day,dayofmonth("- Invoice Distribution Details - General Information"."Distribution Deferred Accounting Start Date") * -(1) + 1, "- Invoice Distribution Details - General Information"."Distribution Deferred Accounting Start Date"))))
Last Day of the Next Month
TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_MONTH , 2, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE)))
참조 : https://www.justanalytics.com/blog/technical-know-how/obiee-date-dimension-reference_new