Topic: Date format on SQL Query
I have a button to populate tGrid via SQL Query (Populating tGrid via search wasn't satisfactory so SQL Query used instead).
The following script is written by EHW. I only added date bit.
Select 'PI-' || Invoice.Counter3,'Db-' || Refund.Counter4,Refund.DBCRvalue,
Refund.PIRdate,Supplier.name,Invoice.product,
TaxRates.TaxRate,printf('%.2f',Invoice.PIprice),printf('%.2f',Refund.PIRprice),
Refund.Id
From Refund
Left Outer Join Invoice On Invoice.Id = Refund.id_Invoice
Left Outer Join Supplier On Supplier.Id = Refund.id_Supplier
Left Outer Join TaxRates On TaxRates.Id = (Select TaxRates.Id From TaxRAtes
Where TaxRates.Id = Invoice.id_TaxRates)
Where Refund.DBCRValue = 'Db'
All good but I couldn't get date displayed correctly. "PIR Date" field (Date field to be displayed on tGrid under "Date" column, set as Date only not including time. I guess when SQL used it gets row data which includes date and time ( I remember Dmitry saying something like this about display format of values of currency fields on tGrid when calc fields used etc.)
How can I get date on tGrid displayed without the time while using SQL script above in a same format as in my PC date time settings?
On the image above "PIR Date" field date format (DD-MM-YYYY) matches to my PC date and time settings, but tGrid date is not .
God... please help me become the person my dog thinks I am.