# TryParseDate (String, UnknownDate)

| **Name**    | ***TryParseDate***                                                                                                  |
| ----------- | ------------------------------------------------------------------------------------------------------------------- |
| Syntax      | TryParseDate (String str, Unknown date)                                                                             |
| Purpose     | To carry out a parameter test which checks whether a string value can be converted into a DateTime format value.    |
| Description | Returns true if a string value is successfully converted and parsed into a DateTime value. Otherwise returns false. |
| Return Type | Boolean                                                                                                             |
| Parameters  | <p>Str \[System.String] – Value to be tested</p><p>Date \[System.DateTime]</p>                                      |

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/0%20\(22\).png)

**Example**

In this example, we will pass a string value representing an unknown date format to the function transformation object using a *Variables* object.

Where,

*str* = 1978.MAR.17

<figure><img src="https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/1%20(23).png" alt=""><figcaption></figcaption></figure>

In the output window, you can see that the provided value has been parsed successfully, the unknown date format has been converted into a known date format, and the Boolean value, True has been returned, indicating a successful parameter test.

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/2%20\(23\).png)


---

# 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/astera-data-stack-v8/functions/conversion/tryparsedate-string-unknowndate.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.
