refactoring to use Numeric instead of datetime

Change-Id: I68a5af72de414d562e0e40a1a64315b44bd3f35e