added datetime, got database working

got to fetch the data from the database