Date based on another column

Hi All - I have 2 columns of Employment_start_date and Employment_end_date. How can i ensure the Employment_end_date is always greater then the Employment_start_date.

Thanks.

Dunno if it’ll help, but, I’ve got this for one of my fields

(now() +days(random(14,14))).to_date

creates a date up to 14 days in the future, maybe you could just substitute your start date for the now() bit, don’t know if it would be sensitive to your start date format.

Cheers

Thanks :slight_smile: this should work…but there may be scenarios where employment is an array type for a individual… in that case we will have to use dataset.

Set the date range for the start dates to be less than the date range for the end dates.

field(‘Employment_start_date’) + seconds(random(1,59)) + days(random(1,30)) + month(random(1,12)) + year(random(1,8))