Mockaroo Formulae

Hey People

I have a field called as relieving_date
I have a field called as date_of_joining
I have a field called as status

I want the value of relieving_date to be set only if status = ‘Left’
I want the value of relieving_date to be set greater than date_of_joining

Can anyone suggest me a formula for this particular situation?

This is how I would do it:

https://mockaroo.com/e197bc10

Continuing the discussion from Mockaroo Formulae:

relieving_date + days(random(0,date_diff('days',date_of_joining, now())))

Will get you a random date between join day and today, to avoid having leaving dates in the future.