I assume the HASHDOB function date is not always within the same month. If you want to stay in the same month then I would use a SQLFUNCTION.
dateadd(d, round(datediff(d, dateadd(day, 1, eomonth(
DoS, -1)), eomonth (
DoS )) * rand(checksum(newid())), 0), dateadd(second,checksum(newid())%48000,
DoS ))
Original Message:
Sent: 09-10-2019 05:08 PM
From: Jaimini Bhatt
Subject: How do I create a date function for masking Date of services within same month
In order for our application to function properly after masking the data, the date of service must remain within the month original date would be.
How can I accomplish the following:
Use DoS +15 days if day part of DOS < 15
else if DOS day part > 15, use DOS -15 days.