mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-27 15:58:25 +00:00
Small tweak to xlsx support to format the date properly. (#3025)
Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
parent
cd3d06c6db
commit
767189d770
@ -30,9 +30,9 @@ static QString formatCellText(const QXlsx::Cell *cell)
|
|||||||
QString cellText;
|
QString cellText;
|
||||||
|
|
||||||
// Determine the cell type based on format
|
// Determine the cell type based on format
|
||||||
if (format.isDateTimeFormat()) {
|
if (cell->isDateTime()) {
|
||||||
// Handle DateTime
|
// Handle DateTime
|
||||||
QDateTime dateTime = value.toDateTime();
|
QDateTime dateTime = cell->dateTime().toDateTime();
|
||||||
cellText = dateTime.isValid() ? dateTime.toString("yyyy-MM-dd") : value.toString();
|
cellText = dateTime.isValid() ? dateTime.toString("yyyy-MM-dd") : value.toString();
|
||||||
} else {
|
} else {
|
||||||
cellText = value.toString();
|
cellText = value.toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user