1

I want to store value from QDateEdit to String. I'have used following code:

QString str = ui->dateeditobject->date().toString("dd/mm/yyyy")

But the problem is, that the month value is not being stored as you can see in the picture.

Where am I going wrong?

T3 H40
  • 2,326
  • 8
  • 32
  • 43

1 Answers1

6

Month is MM (uppercase), otherwise it is minutes

ui->dateeditobject->date().toString("dd/MM/yyyy")

Documentation here.

Davy
  • 429
  • 2
  • 17