# 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                             |
| -------------------------------- | ---------------------------- | --------------------------------------- |
| ![](/files/ZML2Jfn6e0aiYT8ln8og) | `2023-01-02 10:00:00`        | 1 day after today, with timestamp       |
| ![](/files/zdeD1RZuHBq5H8OGX54L) | `2023-01-02`                 | 1 day after today, without timestamp    |
| ![](/files/demBq6GXbULhXyxb6Ft7) | `2023-01-01 10:10:00`        | 10 minutes after current time (10AM)    |
| ![](/files/PWvANBksVLzNq3YGKbOh) | `2023-04-11`                 | 100 days after today, without timestamp |

## Links


---

# 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://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/object/dbdate.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.
