I'd like to format the test dates generated by Bogus to dd.MM.yyyy
(eg. 29.09.2022).
I've been searching for a solution but can't find anything.
I tried the following but it doesn't work:
var personData = new Faker<Person>()
.RuleFor(
p => p.DateOfBirth,
f => f.Date.Past(30, DateTime.Now.AddYears(-20))
.ToString("dd.MM.yyyy"));
Thanks in advance for any help!