Cognos報表函式



Cognos報表中可以使用各種報表函式。

這些不同的報表函式包括:

_days_between

此函式用於返回一個正數或負數,表示兩個日期時間表達式之間的天數。如果 timestamp_exp1 < timestamp_exp2,則結果將為負數。

使用方法

_days_between(timestamp_exp1, timestamp_exp2)

_days_to_end_of_month

此函式用於返回一個數字,表示日期時間表達式 timestamp_exp 所代表月份中剩餘的天數。

使用方法

_days_to_end_of_month(timestamp_exp)

_first_of_month

此函式用於返回一個日期時間,它是 timestamp_exp 所代表月份的第一天。

_add_days

此函式用於返回將 integer_exp 天新增到 timestamp_exp 後產生的日期時間。

使用方法

_add_days(timestamp_exp, integer_exp)

_add_months

此函式用於返回將 integer_exp 個月新增到 timestamp_exp 後產生的日期時間。

使用方法

_add_months(timestamp_exp, integer_exp)

_add_years

此函式用於返回將 integer_exp 年新增到 timestamp_exp 後產生的日期時間。

使用方法

_add_years(timestamp_exp, integer_exp)

_age

此函式用於返回一個數字,該數字是從今天的日期(YYYYMMDD 格式,年、月、日)減去 timestamp_exp 獲得的。

使用方法

_age(timestamp_exp)

_day_of_week

此函式用於返回一週中的某一天(1到7之間),其中1是一週的第一天,由 integer_exp(1到7之間,1為星期一,7為星期日)指示。請注意,在 ISO 8601 標準中,一週從星期一開始,為第一天。在北美,星期日是一週的第一天,為第7天。

使用方法

_day_of_week(timestamp_exp, integer_exp)

_day_of_year

此函式用於返回 date_exp 中一年中的第幾天(1到366)。也稱為儒略日。

使用方法

_day_of_year(timestamp_exp)

像這樣,還有其他各種報表函式可以使用。

廣告
© . All rights reserved.