--- title: "HOUR(A)" slug: "datetimetransform-template" updated: 2021-11-11T12:03:05Z published: 2021-11-11T12:03:05Z canonical: "docs.datajet.app/datetimetransform-template" --- > ## 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. # HOUR(A) ## DateTime Transform: HOUR(A) ## Returns the Hour portion of DateTime A ## Purpose Use this function to: - Extract the hour function of a TimeStamp - Return the hour portion of a date time field ## Return Value | Property | Value | | --- | --- | | **FieldType** | Integer | | **FieldSize** | Med | | **DataType** | Discrete | | **DataSize** | Short | ```shell Example Return Value: 0.....23 ``` ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DT_HOUR_Sample(1).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”: “HOUR(A)” | HOUR(A) | | **A** | “p2”: “DateTimeFieldName” “p2”: “#YYYY-MM-DD HH:MM:SS” | Required. *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_HOUR_JSON(1).PNG) ## Usage Notes {Insert Notes Here} ## Example | Example | Details | | --- | --- | | **Description** | Extract Hour portion from DateTime field | | **Input** | - Table: = [transactions] - Function: = DateTimeTransform - **DateTimeFunction: = HOUR(A)** - A:= [transactions].[DateTime] - Name: =Hour_DateTme | | **Sample** | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DT_HOUR_Example(1).PNG) |