# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F3UFUUZG1yjbKbyCBJjsV%2F0.png?alt=media)

**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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F3nIlayy8iSXL9edvn7dI%2F1.png?alt=media" 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FoojkNrU2vAqszwrhIx7w%2F2.png?alt=media)
