Date operations


I’m trying to find the difference between two dates. I can’t find where I can specify the result (e.g. days/minutes/seconds…) and how I can troubleshoot when a number that doesn’t make sense is returning.

What it seems to me is happening is when the date is say - (12/11/2017 - 10/13/2016) it returns a number like 9212. Any subtraction within a calendar year works fine (in days)

Any guidance would be appreciated.

Could be something with how you are storing the dates in whatever DB Metabase is querying? I know I had an issue with MongoDB and ISO formatted dates in one table but another was using some odd formatting as a string.

What DB are you using and are you using a standard date format?