Hi,
How can I obtain the Date minus one week? p.e.: the date is(yyyy-mm-dd) "2008-05-03" and I want to get "2008-04-26".
QDate class let's me add days, months and years, but don't let me do substraction.
Thanks,
Hi,
How can I obtain the Date minus one week? p.e.: the date is(yyyy-mm-dd) "2008-05-03" and I want to get "2008-04-26".
QDate class let's me add days, months and years, but don't let me do substraction.
Thanks,
Òscar Llarch i Galán
From QDate::addDays doc :
Returns a QDate object containing a date ndays later than the date of this object (or earlier if ndays is negative).
So just do QDate::addDays(-7)
Hi,
Yes yes, just writing code before reading doc.
Thanks,
Òscar Llarch i Galán
Bookmarks