--- title: "TRUNKSEC(A)" slug: "datetimetransform-template-9" updated: 2021-11-16T14:50:55Z published: 2021-11-16T14:50:55Z canonical: "docs.datajet.app/datetimetransform-template-9" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # TRUNKSEC(A) ## DateTime Transform: TRUNKSEC(A) ## Truncates DateTime A to the nearest minute ## Purpose Use this function to: - Group DateTime data into minute segments ## Return Value | Property | Value | | --- | --- | | **FieldType** | DateTime | | **FieldSize** | Continuous | | **DataType** | Continuous | | **DataSize** | LongInteger | ```shell Example Return Value: [Date] HH:MM:00 ``` ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DT_TRUNKSEC_Sample.PNG) ## 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. | | **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 ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DT_TRUNKSEC_JSON.PNG) ## Usage Notes See FLOORMIN(A,B) for more options on truncating/segmenting DateTime fields. ## Example | Example | Details | | --- | --- | | **Description** | Group purchase time-stamps into minute segments | | **Input** | - Table: = [transactions] - Function: = DateTimeTransform - **DateTimeFunction: = TRUNKSEC(A)** - A:= [transactions].[dtPurchase] - Name: =TRUNKSEC_A | | **Sample** | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DT_TRUNKSEC_Example.png) |