Answer the question
In order to leave comments, you need to log in
How to format a date pulled from a database?
There is a date_reg (DATETIME) field in the DB.
In the project I get it with the line:
QString date_reg = query.value(record.indexOf("date_reg")).toString();
Answer the question
In order to leave comments, you need to log in
What does it mean to format? What kind is needed?
Parse in QDateTime like this , output in the required format like this .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question