My apologies - for the data warehouse, you can use some Postgres functions to get the format that you’re looking for.
If you have the date that vulnerability was found, favf.date
, you can use the age(timestamp) function to get the following example format:
1 years 7 mons 29 days 23 hours 29 mins 3.564 secs
To get the days specifically from this, you could use the following. Note, this syntax is seemingly undocumented, but it will accept the following intervals years
, months
, days
, hours
, minutes
, seconds
.
age(favf.date, 'days')
This will return a floating point value that could be converted to an integer if you want with the following:
ROUND(age(favf.date, 'days'))::integer
There are some of other ways to accomplish this that are documented, but are a bit more verbose.