Creating Datetime value for specific time e.g 9am-5pm

Hi is there a way (formula) to create a datetime value but only for specific time range ?.
For example the field needs to generate a date & timestamp (between 01/01/2021 and 31/01/2021) but the time stamps are only for office hours i.e. 09:00:xx and 17:00:xx

Can I use a formula to achieve this or do I need to split out the time and the date and concat ?.
Cheers !

@watersn - would this fit your needs?

concat(random(date(‘01/01/2021’),date(‘01/31/2021’)), " ",
time(random(Time.parse(“09:00”),Time.parse(“17:00”))))

1 Like