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;
        }

`

1 Answer 1

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!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.