You can do something like this.
Lets assume you've data like this.
Create two date parameters using your date field.
One Start Date and other End Date.
Once done then show both the parameters as show as parameter controls
Create a calculated field using below screen shot to calculated the date diff in seconds.
Let me know if you've any query.
I have a business requirement where I want to use the relative filter but the current date should be a user input and based on that I should be able to select Weekly, Monthly and Quarterly view. Or is there a way to create a date as an input for the user and based on that I will have a list from which I can select weekly, Monthly or a Quarterly view.