QDateTime QString

QDateTime格式化  yyyy-MM-dd hh:mm:ss

QString getFormatDateStr(QDateTime dateTimeParam)
{
    qDebug() << "date:" << dateTimeParam<<"     "<<dateTimeParam.toString("yyyy-MM-dd hh:mm:ss");
    return dateTimeParam.toString("yyyy-MM-dd hh:mm:ss");
}

猜你喜欢

转载自www.cnblogs.com/herd/p/11300312.html