Dates in Mockaroo

After spending an outrageous amount of time trying to figure out how to create dates in mockaroo, here are some tips:

1) There are multiple date functions, you can easily retrieve the data, month and year of a data using date(x), month(x) or year(x). This can become useful when you only want to change one factor, for example you want to replace the day of the month only, you can easily retrieve month and year to create a new date and use random(day_min, day_max) to create a new date!

2) It is easier to recreate a date than to modify dates in mockaroo. Coming from tableau, I thought I could use a date function to remove 2 days from my date. I sadly did not find how to do this in another way than retrieving my days and doing -2 before creating a new date again.

3) Not specific to dates, however, when loading a field from another dataset, it (very stupidly) transforms that field into a string... So whenever you want to use that field in your new dataset you need to convert it back to the data type you wanted to use.

I will add more discoveries as I learn to create beautiful fake datasets.

Author:
Jules Claeys
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab