fixed loadFromText added error checking for date