I'll push a change that casts the two dates (in your case probably timestamps) as dates before subtracting instead. It seems you have observation_period_start_date and observation_period_end_date ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.