TRUNKSEC(A)
  • 1 Minute to read
  • Dark
    Light
  • PDF

TRUNKSEC(A)

  • Dark
    Light
  • PDF

Article summary

DateTime Transform: TRUNKSEC(A)

Truncates DateTime A to the nearest minute

Purpose

Use this function to:
  • Group DateTime data into minute segments

Return Value

PropertyValue
FieldTypeDateTime
FieldSizeContinuous
DataTypeContinuous
DataSizeLongInteger


Example Return Value: [Date] HH:MM:00

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.
DateTime Function“p1”: “TRUNKSEC(A)”TRUNKSEC(A)
A“p2”: “DateTimeFieldName”
“p2”: “DateFieldName”
“p2”: “#YYYY-MM-DD HH:MM:SS”
“p2”: “#YYYY-MM-DD”
Required.  The DateTime String to truncate
Supports:  
  • DataType: Discrete / Continuous
  • Field Type: DateTime
  • Fixed Value:  #YYYY-MM-DD HH:MM:SS,    e.g. #2021-04-05 11:01:08

JSON Sample

Usage Notes

See FLOORMIN(A,B) for more options on truncating/segmenting DateTime fields. 

Example


ExampleDetails
DescriptionGroup purchase time-stamps into minute segments
Input
  • Table: = [transactions]
  • Function: = DateTimeTransform
  • DateTimeFunction: = TRUNKSEC(A)
  • A:= [transactions].[dtPurchase]
  • Name: =TRUNKSEC_A
Sample

Was this article helpful?

What's Next