[SOLVED] Get full date using QDate::currentDate()
-
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().
-
"dddd" sure worked. Thank you very much Code_ReaQtor