add get record in days function