Challenge: VARIANT2TIME does not function with SQL?

stefan.jossenstefan.jossen Member Posts: 14
Hello out there.

I trigger SQL-Queries within Navision with the automation "'Microsoft ActiveX Data Objects 2.8 Library'.Connection".
This functions very well - well except with the Navision-Type TIME.

Example:
Looking at the data through Navision (finsql), the field is filled with "11:07:56"
Looking directly at the data with the SQL-Manager: the field is filled with "1754-01-01 11:07:56.967"

The SQL-Query within Navision returns the VARIANT "01.01.1754 11:07:57". (I see it in the debugger)
I would be happy with that but I need to transform the VARIANT back into a TIME-Value.
I try
vTime := VARIANT2TIME (vVariant);
... and it shows "**:54:50"

I try
vString := FORMAT (vVariant);
... and it shows "01.01.1754"

Which is puzzeling me (mildely put)

Any ideas or hints?

Stefan
Sign In or Register to comment.