Moved stringToDate method to seperate DateUtil.