fixed database, now can show date properly