Date Transform Functions
Functions that operate on DateTime fields and that manipulate hours, minutes and seconds
Purpose
Use Date Transform functions to:
- Manipulate hours, minutes and seconds in a datetime field
- Calculate elapsed time in hours, minutes and seconds
- Segment data into hours, minutes and seconds
Return Value
Property | Value | Notes |
---|---|---|
FieldType | Integer | Datetime transforms return integer fields. |
FieldSize | Low / Med / High | Low - up to 250 unique values Med - Up to 65,630 unique values High - up to 1,000,000 unique values |
DataType | Discrete / Continuus | DateTime transformscan be discrete or continuous |
DataSize | Short / Integer | Short - Up to 65,630 unique values |
Parameters
Parameter | JSON | Description |
---|---|---|
Table | “targetTable”: “MyTableName” | The target table on which the new field will be created |
Filter | “dataset”: {DataSet_JSON} | Optional. If a filter is applied, records not in the filter recordset will be returned as null. |
Date Function | “p1”: “” | Select the DateTime Transform function from the drop-down list. Specifies the function to use. |
A - C | “p2-4”: “NumericFieldName” “p2-4”: “#YYYY-MM-DD” “p2-4”: “#YYYY-MM-DD HH:MM:SS” “p2-4”: “#N*” | Fields/Inputs to use for A-C. The date from which to extract the hour, minute and second Supports:
|
Name | "name" : "FieldName" | Required. The name of the field to create. |
JSON Sample
{
"method": "BuildBakedField",
"targetTable": "PA_All",
"name": "ElapsedSecs",
"function": "datetimetransform",
"p1": "SECSDIFF(A,B)",
"p2": "#2020-11-03 19:39:48",
"p3": "TimeStamp",
"project": "Election5"
}