Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'cs'

...

Sv translation
languageja

日付と時刻の変数

SQLクエリーを動的に変更する必要がある場合、事前定義された変数を使用できます。BellaDatiは現在、日付、時刻、タイムスタンプをユーザー定義の形式で取得する関数をサポートしています:

名前

説明

$date(dateString)

ddateStringを評価し、日付をyyyy-MM-dd形式で出力します。dateString

$date(now + 5d -4w)
$date(2011-01-01 + 5d -4w)
$date(actualMonth -1d)

$date(dateString, format)

$date(dateString)と同様に機能しますが、出力形式はformatパラメーターによって制御されます。

$date(now + 5d -4w, dd-MM-yyyy)
$date(2011-01-01 + 5d -4w, MMyyyy)
$date(actualMonth -1d, yyyy-dd-MM)

$time(timeString)

timeStringを評価し、結果時間をHH:mm:ss形式で出力します。

$time(now)
$time(actualhour)
$time(actualminute)

$time(timeString, format)

$time(timeString)と同様に機能しますが、 出力形式はformatパラメーターによって制御されます。 

$time(now, HH:mm:ss)
$time(actualhour, MMss)
$time(actualminute, HHmmss)

$timestamp()

現在のタイムスタンプ値を返します。

$timestamp()
$lastSuccessfulImport()
最後に成功したインポートのタイムスタンプ値を返します。
$lastSuccessfulImport()

$firstValue(L_ATTRIBUTE_CODE)

現在のデータセットに格納されている属性 IDによって指定された属性の最小値(昇順)を返します。

データがないか、属性コードが無効である場合、空の文字列を返します。

$firstValue(L_ID) //returns 123456

$firstValue(L_DATE_ATTRIBUTE) //returns 2013-01-01
$firstValue(L_TIME_ATTRIBUTE) //returns 10:00:54

$lastValue(L_ATTRIBUTE_CODE)

現在のデータセットに格納されている属性 IDによって指定された属性の最大値(降順)を返します。

データがないか、属性コードが無効である場合、空の文字列を返します。

 

$lastValue(L_ID) //returns 123456

$lastValue(L_DATE_ATTRIBUTE) //returns 2013-12-31
$lastValue(L_TIME_ATTRIBUTE) //returns 23:59:59
$firstValue(DATASET_CODE, L_ATTRIBUTE_CODE)

参照されるデータセットに格納されている属性IDで指定された属性の最小値(昇順)を返します。

 

$firstValue(NEW_DATA_SET__SQL_DATABAS_4, L_ATT)
$lastValue(DATASET_CODE, L_ATTRIBUTE_CODE)

参照されるデータセットに格納されている属性IDで指定された属性の最大値(降順)を返します。

$lastValue(NEW_DATA_SET__SQL_DATABAS_4, L_ATT)
Note

SQLクエリーで変数を使用する場合、変数が引用符で囲まれていることを確認する必要があります。そのため、変数は文字列として使用されます。

 

そのような条件の例は次の通りです: WHEREid> '$ lastValue(L_ID)'


DateString

  • now – 日付を表します。
  • actualyear– 年の最初の日を表します。  – 年の最初の日を表します(20XX.1.1.20XX) 例えば、21例えば、2010.9.2010で選択されたactualyearは日付 21で選択されたactualyearは、日付2010.1.1.2010を表します。
  • actualquarter 四半期の最初の日を表します(20XX.1.1., 20XX, 1.4.1, 20XX, 1.7.1, 20XX, 1.10.20XX1)。例えば、21.9.2010で選択されたactualquarterは日付120109.21で選択されたactualquarterは、日付2010.7.20101を表します。
  • actualmonth - 月の最初の日を表します(20XX.1.1., 20XX, 1.2.20XX1, ...)。例えば、212010.9.201021で選択されたactaulmonthは日付1は、日付2010.9.20101を表します。
  • actualweek - 週の最初の日を表します(月曜日) 例えば、212010.9.201021で選択されたactualweekは日付20は、日付2010.9.2010 20(この週の月曜日)を表します。
  • availableFrom, availableTo –データ入力の利用可能な最初と最後の日を表します– 利用可能な最初と最後の日付エントリを表します。
  • 絶対的な日付入力は、操作者がこの構文を使うことで調整できます日付の相対および絶対入力は、次の構文を使って演算子で調整できますdate +|- n[d|w|m|q|y] nが整数の時、が整数、d は日、 は日、 w は週、は週、m は月、は月、qは四半期、yは年を表します。例えばこのように定義できますは年を表します。例えばこのように時間を定義できます:  actualyear + 2m -4d今日は21今日は2010.9.2010であるため、このバリューは121であるとすると、この値は2010.1.2010 1 + 2 months 2か月 - 4 days、つまり日付は254日、つまり日付は2010.2.2010を表します。25を表します。

TimeString

  • now – 時刻を表します。
  • actualhour - 時間を0分と0秒で表します。
  • actualminute - 分を0秒で表します。
  • actualsecond - 秒を表します。
Sv translation
languagede

 Datums- und Zeitvariablen

Wenn Sie die SQL-Abfrage dynamisch ändern müssen, können Sie vordefinierte Variablen verwenden. BellaDati unterstützt derzeit Funktionen zum Abrufen von Datum, Uhrzeit oder Zeitstempel in benutzerdefinierten Formaten:

Name

Beschreibung

Beispiel

$date(dateString)

Evaluates the dateString and outputs the date in yyyy-MM-dd format. The dateString

$date(now + 5d -4w)
$date(2011-01-01 + 5d -4w)
$date(actualMonth -1d)

$date(dateString, format)

Works like $date(dateString), but output format is controlled by format parameter

$date(now + 5d -4w, dd-MM-yyyy)
$date(2011-01-01 + 5d -4w, MMyyyy)
$date(actualMonth -1d, yyyy-dd-MM)

$time(timeString)

Evaluates the timeString and outputs the resulting time in HH:mm:ss format

$time(now)
$time(actualhour)
$time(actualminute)

$time(timeString, format)

Works like $time(timeString), but output format is controlled by format parameter

$time(now, HH:mm:ss)
$time(actualhour, MMss)
$time(actualminute, HHmmss)

$timestamp()

Returns the current time stamp value

$timestamp()
$lastSuccessfulImport()
Returns time stamp with last successful import
$lastSuccessfulImport()

$firstValue(L_ATTRIBUTE_CODE)

Returns the lowest value (sorted ascending) of the attribute specified by attribute ID stored in the current data set.

Returns empty string if there are no data or the attribute code is not valid.

$firstValue(L_ID) //returns 123456

$firstValue(L_DATE_ATTRIBUTE) //returns 2013-01-01
$firstValue(L_TIME_ATTRIBUTE) //returns 10:00:54

$lastValue(L_ATTRIBUTE_CODE)

Returns the highest value (sorted descending) of the attribute specified by attribute ID stored in the current data set.

Returns empty string if there are no data or the attribute code is not valid.

$lastValue(L_ID) //returns 123456

$lastValue(L_DATE_ATTRIBUTE) //returns 2013-12-31
$lastValue(L_TIME_ATTRIBUTE) //returns 23:59:59
Note

Wenn Sie die Variablen in der SQL-Abfrage verwenden, sollten Sie sicherstellen, dass die Variable in Anführungszeichen gesetzt wird, damit sie als Zeichenfolge verwendet wird.
 

Ein Beispiel für eine solche Bedingung kann sein: WHERE id> '$ lastValue (L_ID)'

DateString

  • now - repräsentiert das aktuelle Datum
  • actualyear - repräsentiert den ersten Tag des tatsächlichen Jahres (1.1.20XX). Beispielsweise repräsentiert das am 21.9.2010 ausgewählte aktuelle Jahr das Datum 1.1.2010
  • actualquarter - stellt den ersten Tag des tatsächlichen Quartals dar (1.1.20XX, 1.4.20XX, 1.7.20XX, 1.10.20XX). Beispielsweise entspricht das am 21.9.2010 ausgewählte aktuelle Quartal dem Datum 1.7.2010
  • actualmonth - stellt den ersten Tag des aktuellen Monats dar (1.1.20XX, 1.2.20XX, ...). Beispiel: tatsächlicher Monat, ausgewählt am 21.9.2010, entspricht dem Datum 1.9.2010
  • actualweek - repräsentiert den ersten Tag der tatsächlichen Woche (Montag). Beispielsweise repräsentiert die am 21.9.2010 ausgewählte tatsächliche Woche das Datum 20.9.2010 (Montag dieser Woche im Kalender)
  • availableFrom, availableTo - represents the first and last available date entry
  • relative and absolute enterig of date can be adjusted by operators using this syntax: date +|- n[d|w|m|q|y], where n is integer, d represents day, w represents week, m represents month q represents quartal and y represents year. We can for example define time in this way:  actualyear + 2m -4d. Today is 21.9.2010, so this value represents 1.1.2010 + 2 months - 4 days, which means date 25.2.2010.

TimeString

  • now - represents actual time
  • actualhour - represents the actual hour at 0 minutes and 0 seconds.
  • actualminute - represents the actual minute at 0 seconds
  • actualsecond - represents the actual second