i want to send the local system time through the serialport.i used below command
port->write(QDateTime::toString(Qt::LocalDate).toAscii( ));

i am getting this error while compiling,

main.cpp:658: error: cannot call member function `QString QDateTime::toString(Qt
:ateFormat) const' without object


i tried in many ways,but am not getting the clear idea regarding this,please assist me,

thanks in advance.