You are here: Calculated Values > DateTimeCalculator

DateTimeCalculator

Performs arithmetic on date, time, datetime, and interval values.In Advanced Expression mode, composite expressions involving datetimes and intervals may be constructed.

也可以看看:日期/Time Terminology,日期/Time Format,日期/Time Functions

DateTimeCalculator在五个上执行算术temporal types:

  1. 日期
  2. Time
  3. Time with UTC offset
  4. 约会时间
  5. 与UTC偏移量的DateTime

输入的时态字符串必须在FME format.

If input strings are invalid but repairable, they will be auto repaired. For example, in a date string, month = 13 will cause the year to be incremented by 1, and month set to 01.

DateTimeCalculatoralso supports interval arithmetic, where the interval can be specified in one of two ways:

  • Specified by part. For example, the user can specify 5 for the value of “Years”.
  • Specified by an interval string inISO 8601 duration format.

Invalid temporal and interval input will cause date time functions that consume them to return null, and cause the feature to be rejected.

Limitations:

  • Supported temporal range: 1000-01-01 00:00:00.000000000 to 9999-12-31 23:59:59.999999999.
  • 如果输入时间值包含分数秒,则只有十进制分隔符“。”。得到支持。
  • When subtracting a temporal value from another, the two temporal values must have the same temporal type, or the feature will be rejected.
  • 如果零件指定了间隔,则零件值必须是所有非负,或者所有非正数,或者将被拒绝。

输入端口

输出端口

Parameters

Editing Transformer Parameters

使用一组菜单选项,可以通过引用工作区中的其他元素来分配变压器参数。一些变压器也可提供更高级的功能,例如高级编辑器和算术编辑器。要访问这些选项的菜单,请单击除适用的参数旁边。有关更多信息,请参阅Transformer Parameter Menu Options.

Transformer Categories

Calculated Values

Search FME Knowledge Center

Search for samples and information about this transformer on theFME Knowledge Center.