Support fetching stream values by date
Refactor using c++ template