# DateToJulian (Date dateTime, Integer length)

| **Name**    | ***DateToJulian***                                                                                             |
| ----------- | -------------------------------------------------------------------------------------------------------------- |
| Syntax      | DateToJulian (Date dateTime, Integer length)                                                                   |
| Purpose     | To convert the given date time value to Julian format of specified length.                                     |
| Description | Convert the given date time value to Julian format.                                                            |
| Return Type | String                                                                                                         |
| Parameters  | <p>dateTime \[System.DateTime] – Date Time object to be converted into Julian</p><p>length \[System.Int32]</p> |

**Example**

![](/files/lFbB0NBcNgShkzP3KmdE)

In this example, we will pass a date time value and an integer value to the function transformation object using a *Variables* object.

Where,

*dateTime* = 05/06/2022

*length* = 7

![](/files/vPV67WBwZstFwRMESxfh)

In the output window, you can see that the provided date time value has been converted into Julian format of the specified length.

![](/files/uFpx3OIlh2lN7OWpUYcs)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/functions/date-time/datetojulian-date-datetime-integer-length.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
