-
Hola! He intentado compara fechas a partir de un QDateEdit sin exito, el codigo es el siguiente
QString fecha_principio,fecha_fin;
fecha_principio=ui->d_vdesde->text().trimmed(); fecha_fin=ui->d_vhasta->text().trimmed(); QDate Date_inicio = QDate::fromString(fecha_principio,"dd/MM/yyyy"); QDate Date_fin = QDate::fromString(fecha_fin,"dd/MM/yyyy"); if((Date_inicio==(Date_fin))||(Date_inicio.operator>(Date_fin)))
{ Mensaje de error si se cumple esta condicion}
else
{lo que necesito que haga}Nunca logro salir del mensaje de error independienteme lo que coloque en las fechas
En la primera comparacion coloque == pero tambien he probado .operator== -
This forum is English only, please post you question in the Spanish section.
-
@JohanSolo I've moved the topic.
-
@aha_1980 you may want to close this post as OP double posted in Spanish section as well (see 2 posts with same title/content)
-
Closed as duplicate of https://forum.qt.io/topic/99320/comparar-fechas