added sql script and datetime class
too much to descrbie