Himmators Himmators - 1 year ago 69
SQL Question

Add deletedAt future date?

Is it possible to add a deltedAt for a future date in order for it to work as an expiration date?

Answer Source

Yes you can. If you have a DeletedAt date, you can set it to some date in the future and then, when you run your query, you can specify

WHERE DeletedAt >= @currentDate

Then, anything that has a DeletedAt in the future will be returned. Anything that has passed its DeletedAt date will not be returned.