Fixed NumberFormatException error with adding a date