Datetime

Below is a list of available datetime mockers.

Date

Generates a random datetime object between two specified date objects, from year until days.

Parameters

  • Start date: The start date for the generation range (Format: %d/%m/%Y).

  • End date: The end date for the generation range (Format: %d/%m/%Y).

  • Consistent mapping: Date supports consistent mapping.

Example

If you configure:

03/11/2024 to 05/11/2024

The results will be:

2024-11-04,
2024-11-03,
2024-11-03,
...

Date of birth

Generates a date of birth which is a datetime object.

Parameters

Example

If you configure:

Locale: English (United States)

The results will be:

2025-03-17
2025-03-04
2025-03-13
2025-04-02
...

Date/Time

Generates a random datetime object between two specified datetime objects, from year until seconds.

Parameters

  • Start date: The start date for the generation range. (Format: %d/%m/%Y %H:%M:%S)

  • End date: The end date for the generation range.

  • Consistent mapping: Date/Time supports consistent mapping.

Example

If you configure:

03/11/2024 06:00:00 to 05/11/2024 22:00:00

The results will be:

2024-11-05 08:52:41.340181,
2024-11-04 11:44:02.440943,
2024-11-03 21:43:52.323659,
...

Date/Time series

Generates a series of datetime values at regular intervals based on a specified time unit and step size.

Parameters

  • Start date: The starting date or datetime for the series.

  • Time unit: The unit of time for the step increment ("day", "week", "month", "year").

  • Number: The number of units to step forward per iteration.

Example

If you configure:

Start date: 03/11/2024 06:00:00
Time unit: Month
Number: 3

The results will be:

2024-11-03 06:00:00,
2025-02-03 06:00:00,
2025-05-03 06:00:00,
...

Future date

Generates a future datetime object, always after the current day.

Parameters

Example

If you configure:

Locale: English (United States)

The results will be:

2025-03-17
2025-03-04
2025-03-13
2025-04-02
...

Last updated

Was this helpful?