--- title: "HOD(A)" slug: "hoda" updated: 2021-10-13T07:12:36Z published: 2021-10-13T07:12:36Z canonical: "docs.datajet.app/hoda" --- > ## 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. # HOD(A) ## Engineering Functions: [HOD(A)] ## Returns the Hour portion from DateTime Field A. ## Purpose Use this function to: - Group Data into hourly segments - Determine hourly activity patterns across multiple days - Extract hour of day data for use in other calculation ## Return Value | **FieldType** | Integer | | --- | --- | | **FieldSize** | Med | | **DataType** | Discrete | | **DataSize** | Short | `0...23` ## Parameters | **Component** | **JSON** | **Description** | | --- | --- | --- | | #### **Table** | “targetTable”: “MyTableName” | The target table on which the new field will be created | | **Filter** | “dataset”: {DataSet_JSON} | Optional. Any records not in the filter Recordset will be returned as null by HOD(A) | | **DateTime Function** | “p1”: | HOD(A) | | **A** | “p2”: “DateTimeFieldName” | DateTime field. Required. Must be on the target table. The DateTime Field from which to extract Hour data. | ## JSON sample ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1634109136456.png) ## Usage Notes ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1634109136484.png) ## Example | ### Extract Hour of Day from TimeStamp | | --- | | - Table: = PA_All - **Function: = DateTimeTransform** - **DateTimeFunction: = HOD(A)** - A:= TimeStamp | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1634109136513.png) |