Your problem is very simple.
Create console application in QtCreator, and edit your main.cpp
this way:
#include <QApplication>
#include <QDate>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// get current date
QDate dNow(QDate::currentDate());
// create other date
// by giving date 12.21.2012 (joke about end of the world)
QDate dEndOfTheWorld(2012, 12, 21);
qDebug() << "Today is" << dNow.toString("dd.MM.yyyy")
<< "Days to end of the world: "
<< dNow.daysTo(dEndOfTheWorld);
return a.exec();
}
And you'll got output like:
Today is "18.12.2012" Days to end of the world: 3
P.S. But my advice to you is learn C++ (add to your favorite this topic -- The Definitive C++ Book Guide and List), and then learn Qt (I recommend C++ GUI Programming with Qt 4 by Jasmin Blanchette & Mark Summerfield and Summerfields other books).
Good luck!