Subject Re: [firebird-support] Re: Timestamps in ORDER BY Clause?
Author Helen Borrie
At 02:28 AM 29/05/2004 +0000, you wrote:

> The timestamp string in the "INSERT INTO" statement
>comes from from the system's time structure. In the
>case of Windows, that's a SYSTEMTIME structure.
>
> So I build a text string like this:
>
> 2004-05-27 22:03:01.578
>
> The ms value is passed to the database. I don't know
>if it saved.

Why not query it and see? It ought to save that complete with the
milliseconds but it's pretty flukey if it's reading off client
machines. How do you synchronise their system times?


> The IBPP::Time's GetTime() function is defined as
>
>void GetTime(int& hour, int& minute, int& second) const;
>
> Is the millisecond value extracted from the database?

Clearly not. second is an integer, right?


> How do I get it?

Use the UDF GetExactTimestamp(), which you'll find in FBUDF. It has no
input parameter, but returns the server system date and time down to
ten-thousandths of a second.

/heLen



> Thanks
> Larry
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>