> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/object/strtodate.md).

# strToDate

## Description

Displays a date in a full text description.

E.g. Thu Jul 06 2023 18:35:58 GMT+0800 (Singapore Standard Time)

## Input / Parameter

| Name | Description                            | Input Type  | Default        | Options | Required |
| ---- | -------------------------------------- | ----------- | -------------- | ------- | -------- |
| date | The date to be displayed in full text. | String/Text | (Current-Date) | -       | No       |

## Output

| Description                        | Output Type |
| ---------------------------------- | ----------- |
| Returns the full text of the date. | String/Text |

## Callback

N/A

## Video

Coming soon.

## Example

The user wants to convert date string to DateTime and print it in the console.\
date : 2018-04-12<br>

### Step

1. Call the `console` function. Call the `strToDate` function inside the `value` parameter of the `console` function.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-5df9921e31442c8f73365c7d3b89b5b700ec3354%2FstrToDate-step-1.png?alt=media)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-ba4269c7cb31ca39c8e633069c7de3d03ac7a370%2FstrToDate-step-2.png?alt=media)

### Result

![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-da12668272573eff1f84f068b9cc0ea832bdec02%2FstrToDate-result-1.png?alt=media)

## Links
