xsharp.eu • Function AdoDateTimeAsDate()
Page 1 of 1

Function AdoDateTimeAsDate()

Posted: Mon May 06, 2024 3:36 pm
by Kees Bouw
It seems that the function AdoDateTimeAsDate() is not working as it is explained in the Xs2Ado Helpfile. There it says "When set to TRUE, all datetime values from ADO are returned as X# Dates.Time information is lost when using this conversion. When set to FALSE, all DateTime values from Jet are returned as AdoDateTime objects".

What I find is that when AdoDateTimeAsDate() is FALSE, the return type is Xs2Ado.AdoDateTime which is correct, but when it is TRUE, the return type is System.DateTime and not the X# DATE type as promised.

To have a workaround, what is the easiest way to convert from System.DateTime to DATE ?

Kees.

Re: Function AdoDateTimeAsDate()

Posted: Mon May 06, 2024 4:07 pm
by robert
Kees,
The conversion is automatic :

Code: Select all

local oDt as DateTime
local dToday as DATE
oDt := DateTime.Now
dToday := oDt // implicit conversion
Robert