Error adding days on date

I am adding days to the date, but I have already tried several date formats and none work and generates the following error:
1 - Date sent
2 - error returned.

Attached image

I need help, please.

The addDays method returns an instant (also known as java.util.Calendar), which you can format it as a normal date using one if these blocks:

Therefore that isn’t an error.
1 Like

I made the necessary changes but the result was not satisfactory.

Image attached.

1 Like

1 Like

I’m trying

I tested it and the result generated the following error: Image attached.

1 Like

I will test now.

Test completed, result is still not legal.

Image attached.

Is exchanging the month for the day.

As Boban said before.
Your date pattern isn’t correct:

It should be MM/dd/YY as the documentation says.With your current blocks, 05 is getting treated as the month, and 11 is getting treated as the day :slightly_smiling_face:

That’s right, I already made the correction and now it’s ok.

Thank you all.

How the USA write dates…

Working up from days to years makes sense, and so does the reverse. Swapping days and months around causes momentary confusion for every other country on the planet and it hasn’t caught on for a reason. Did someone mess up writing the date on the constitution and now they have to live like this forever?

c/o The Daily Mash


Have a look at this guide -

From the guide

  • Days