Changed value to Date
Fixed error checking. Added rudimentary date parsing.