fixed correct dateprint and reading for database