この関数は入力として timestamp と month 、year を取得し、入力で指定された year と month で timestamp を更新します。 .
Syntax:
SetDateYearMonth (timestamp, year, month)
Return data type: dual
Arguments:
引数 | 説明 |
---|---|
timestamp | 標準的な Qlik Sense タイムスタンプ (通常、日付のみ) |
year | 4 桁の年。 |
month | 1 桁または 2 桁の月。 |
これらの例は、日付書式 DD/MM/YYYY を使用しています。日付書式は、データ ロード スクリプト上部の SET DateFormat ステートメントで指定されています。必要に応じて、書式を変更してください。
例 | 結果 | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
setdateyearmonth ('29/10/2005', 2013, 3) | ' |
||||||||||||||||||||||||
setdateyearmonth ('29/10/2005 04:26:14', 2013, 3) | ' ビジュアライゼーションのタイムスタンプの時間の部分を表示するには、数字の形式を日付に設定し、時間の値を表示する形式について値を選択する必要があります。 |
||||||||||||||||||||||||
アプリにスクリプト例を追加して実行します。その後、結果列に含まれている項目をアプリのシートに追加して結果を表示します。 SetYearMonth: Load *, SetDateYearMonth(testdates, 2013,3) as NewYearMonth Inline [ testdates 1/11/2012 10/12/2012 2/1/2013 19/5/2013 15/9/2013 11/12/2013 14/5/2014 13/6/2014 7/7/2014 4/8/2014 ]; |
|