> 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/dbdate.md).

# dbDate

## Description

Retrieves the current date and enables adding a specific duration or increment to a date.

## Input / Parameter

| Name     | Description                                   | Input Type  | Default | Options                       | Required |
| -------- | --------------------------------------------- | ----------- | ------- | ----------------------------- | -------- |
| withTime | If time is included in the result             | Boolean     | false   | -                             | Yes      |
| add      | The duration to be added in the current date. | Number      | 0       | -                             | No       |
| type     | The duration type of 'add'.                   | String/Text | days    | days, hours, minutes, seconds | No       |

## Output

| Description                              | Output Type |
| ---------------------------------------- | ----------- |
| Returns the calculated date or datetime. | String/Text |

## Callback

N/A

## Video

Coming soon.

## Example

Assuming current datetime is 01-Jan-2023 10:00AM. The table below lists some sample inputs and the expected output by the `dbDate` function.

| Function inputs                                                                                                                                                                                           | Expected result in `console` | Explanation                             |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | --------------------------------------- |
| ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-fb8f0527dccae85786e22d3f81fec6809fc58dcb%2FdbDate-eg-1.png?alt=media) | `2023-01-02 10:00:00`        | 1 day after today, with timestamp       |
| ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-58ad0308ab5cdb6a9142206960e7b4ee58924684%2FdbDate-eg-2.png?alt=media) | `2023-01-02`                 | 1 day after today, without timestamp    |
| ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-132050055c7d3a70fa8194ee3bf61f5a28d40f0b%2FdbDate-eg-3.png?alt=media) | `2023-01-01 10:10:00`        | 10 minutes after current time (10AM)    |
| ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-be2da5de6d933238c79d8f78facfaeb86b25c3a3%2FdbDate-eg-4.png?alt=media) | `2023-04-11`                 | 100 days after today, without timestamp |

## Links
