Working out the amount of days between 2 columns

Within the Retool Database I am trying to create a column to show the amount of days between 2 dates which are held in 2 separate columns. One of the dates is based on sql to show todays date which is now() and the other date is inputted by a user via a form.

So the new column needs to do the following calculation

Date input by user - todays date = days (integer)

What format is the date in?

You can just subtract one from the other when reading the data in a query.

Hi Jebit,

Thanks for this.

Please see the attached


screenshot, would I use the formula within this area or the app?

You would use it in the query when reading the data. In my case it is "ev.date_out - ev.date_in as eventlength"
so eventlength is the number of days between the dates. I don't store it as a column in the DB.
Hope that helps.