1

System.out.println("Enter date of birth (yyyy-MM-dd):"); String dateOfBirth = scanner.nextLine();

        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date birthDate;
        try {
            birthDate = dateFormat.parse(dateOfBirth);
        } catch (ParseException e) {
            e.printStackTrace();
            continue;
        }

`

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
Mansi Bora
  • 11
  • 2

1 Answers1

0

You haven't provided much details but it looks like this is a duplicate of CodecNotFoundException: Codec not found for requested operation: [date <-> java.util.Date].

The CQL date type maps to the driver's LocalDate as listed in the CQL-to-Java-type mapping table. You will need to create a codec to map the CQL date to a Java date type.

For details, see Custom Codecs in Java driver 3.11. Cheers!

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23