PDA

View Full Version : sending localsystem time through port



jjbabu
2nd October 2007, 07:29
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
::DateFormat) const' without object

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

thanks in advance.

marcel
2nd October 2007, 13:34
It's port->write(QDateTime::currentDateTime().toString(Qt::Lo calDate).toAscii( ));

jjbabu
3rd October 2007, 07:25
hi marcel,
thanx for ur kind response.i got the result,
cheers :-)
bye.