ShamusVW
27th August 2010, 09:45
I am reading a value from a mySQL database that is a double, representing a date value.
I am wanting to pass this value to a QLabel.
ui->labelDate->setText("Date : " + list.at(1));
However, it uses the ISODate and my output is [say] 2010-08-18T00. I do not want the "T00" at the end, and it is picking it up because of a decimal point existing in my data. I only want it to use the date part. I don't want to first convert the data to an integer first if possible.
How do I specify to use [say] "yyyy/mm/dd" as my format? I see there is another ENUM QT::TextDate, but I'm not sure how to specify enums.
Thanks.
I am wanting to pass this value to a QLabel.
ui->labelDate->setText("Date : " + list.at(1));
However, it uses the ISODate and my output is [say] 2010-08-18T00. I do not want the "T00" at the end, and it is picking it up because of a decimal point existing in my data. I only want it to use the date part. I don't want to first convert the data to an integer first if possible.
How do I specify to use [say] "yyyy/mm/dd" as my format? I see there is another ENUM QT::TextDate, but I'm not sure how to specify enums.
Thanks.