--- title: "DATEFROM(A,B,C)" slug: "engineeringdatefunction2-6" updated: 2025-04-15T16:08:34Z published: 2025-04-15T16:08:34Z canonical: "docs.datajet.app/engineeringdatefunction2-6" --- > ## 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. # DATEFROM(A,B,C) ## Date Transform: DATEFROM(A,B,C) ## Create a Date Field from Year(A), Month(B) and Day(C) ## Purpose Use this function to: - Construct date fields from integer parts ## Return Value | Property | Value | | --- | --- | | **FieldType** | Date | | **FieldSize** | Med | | **DataType** | Discrete | | **DataSize** | Short | ```shell Example Return Value: 2019-05-08 ``` ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DATEFROM_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. | | **DateTimeFunction** | “p1”: “DATEFROM(A,B,C)” | DATEFROM(A,B,C) | | **A** | “p2”: “YearFieldName” “p2”: “#YYYY” | Required. Integer value specifying the year component of a date. *Supports:* - **DataType:** Discrete - **Field Type:** Integer - **Fixed Value:** #YYYY e.g. #2021 | | **B** | “p3”: “MonthFieldName” “p3”: “#MM” | Required. Integer value specifying the month component of a date. *Supports:* - **DataType:** Discrete - **Field Type:** Integer - **Fixed Value:** #MM e.g. #12 | | **C** | “p4”: “DayFieldName” “p4”: “#DD” | Required. Integer value specifying the day component of a date. *Supports:* - **DataType:** Discrete - **Field Type:** Integer - **Fixed Value:** #DD e.g. #17 | ## JSON Sample ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DATEFROM_JSON.PNG) ## Usage Notes A mixture of FIXED_VALUES and Database fields can be used to create the new date field. Date fields can also be created from strings using the **DateFromString** function. ## Example | Example | Details | | --- | --- | | **Description** | Create a random date field | | **Input** | - Table: = [transactions] - Function: = DateTransform - **DateTimeFunction: = DATEFROM(A,B,C)** - A:= [transactions].[year] - B: = [transactions].[Random_Month2] - C: = [transactions].[Random_Day2] - Name: = Random_Date | | **Sample** | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DATEFROM_Example.PNG) |