# RandomDate

> Generates a random date between two dates. You can define the date range in the following format: mm/dd/yyyy.

Generates a random date between two dates. You can define the date range in the following format: mm/dd/yyyy.

## Definition

**Namespace:** UiPath.Testing.API

**Assembly:** UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

## `RandomDate(DateTime, DateTime)`

```
DateTime RandomDate(
    DateTime minDate,
    DateTime maxDate
)
```

`minDate` [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) : Minimum date range.

`maxDate` [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) : Maximum date range.

## Return value

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

Generated random date.
