Dynamic filtering inside custom timeframe

Ideally, you'd create a date dimension to handle that.

If you can't extend the database, what database are you using and what have you tried so far?

Does this help: