This might be what you are after:
// get the value from the edit
// format with the same format as the date time edit
QString timeDateString
= dateTime.
toString(dateTimeEdit.
displayFormat());
// do stuff with the time/date string
...
// get the value from the edit
QDateTime dateTime = dateTimeEdit.dateTime;
// format with the same format as the date time edit
QString timeDateString = dateTime.toString(dateTimeEdit.displayFormat());
// do stuff with the time/date string
...
To copy to clipboard, switch view to plain text mode
Bookmarks