1. Learn
  2. /
  3. Courses
  4. /
  5. Cleaning Data in Java

Connected

Exercise

Parsing text into dates and numbers

You're preparing to validate the data types in the coffee shop sales. Set up the functions to check dates and numbers on sample data.

The necessary packages such as DateTimeFormatter, and NumberUtils have been imported for you.

Instructions

100 XP
  • Specify the date format for the data as M/d/yy.
  • Parse the transaction amount as a Double.
  • Check if the transaction amount can be parsed as a number.