DateTime Transform Overview
  • 1 Minute to read
  • Dark
    Light
  • PDF

DateTime Transform Overview

  • Dark
    Light
  • PDF

Article summary

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

PropertyValueNotes
FieldTypeIntegerDatetime transforms return integer fields.
FieldSizeLow / Med / High Low - up to 250 unique values
Med - Up to 65,630 unique values
High  - up to 1,000,000 unique values
DataTypeDiscrete / ContinuusDateTime transformscan be discrete or continuous
DataSizeShort / Integer Short - Up to 65,630 unique values

 Parameters

ParameterJSONDescription
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:  
  • DataType: Discrete / Continuous
  • Field Type:  DateTime
  • Fixed Value:  #YYYY-MM-DD HH:MM:SS,    e.g. #2021-04-05 11:01:08
  • Fixed Value:  #NN,    e.g. #10
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"
}






Was this article helpful?

What's Next