vendredi 3 avril 2015

Change the format of a QDate

I need to change the format of a QDate. Here is my code:



yday = (QtCore.QDate.currentDate().addDays(-1))


And I got this result...



PyQt4.QtCore.QDate(2015, 4, 2)


But I need the date in this format:



2015/04/03



Aucun commentaire:

Enregistrer un commentaire