login to db, datestring formatted