[SOLVED] Get full date using QDate::currentDate()
General and Desktop
3
Posts
2
Posters
35.8k
Views
1
Watching
-
Hey everybody!
I'm using
@QString s = QDate::currentDate().toString();@
to get the current system date. However, the string returned has the shortened version of the current day. That is, it returns 'Mon' for 'Monday', 'Wed' for 'Wednesday' etc. How do get the function to return the full day name and not it's short form.
Thanks.
-
You might have used the wrong format for the output string.
Take a look at "this":http://doc-snapshot.qt-project.org/4.8/qdate.html#toString
use "dddd" instead of "ddd" to output the QDate::longDayName().