PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Date Field Displaying Inconsistencies in Report: Client-Specific Issue
Date Field Displaying Inconsistencies in Report: Client-Specific Issue
Started by Kaique Silva, Feb., 14 2024 8:21 PM - 1 reply
Posted on February, 14 2024 - 8:21 PM
I have a report that is displaying conflicting information in a date field within a table.

The code I used was:

ConnectToDataBase()

IF NOT SQLExec(SQL_SCRIPT, DATA_SOURCE)
Error(errorInfo())
ELSE
WHILE SQLFetch(DATA_SOURCE) = 0
line is int = tableAddLine(Table)

// The problem is here
Table.dateIssued = [line] = SQLGetCol(ds_data, 9)

// Other code content.

END


The code works and fills the table correctly as expected, however, the dateIssued field is coming out broken, e.g., //2022, /00/_

This is happening only on my client's computer, and on my computer, it works normally.

I tried the following solution:

I changed the column field from Date to text and used the function dateToString(SQLGetCol(ds_data, 9)), but it didn't work as I expected, presenting the same type of problem.

Can anyone help me?
Registered member
80 messages
Posted on February, 15 2024 - 12:27 PM
Hi

If i remember correctly, SqlGetCol is returning a sting value by default. You might need stringtodate() function to fill the right value in the table. Also use datevalid() to make sure you are actually getting a valid date.

--
Ben Dell
Riebens Computers Pty Ltd
Southern Africa PcSoft Distributor
www.windevsa.co.za
PcSoft Sales, Support and Training