Subject | Re: Timestamps in ORDER BY Clause? |
---|---|
Author | barfingdog_2004 |
Post date | 2004-05-29T02:28:34Z |
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
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.
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?
How do I get it?
Thanks
Larry
wrote:
> At 09:30 PM 28/05/2004 +0000, you wrote:full
> > > >
> > > > I still need milliseconds in a timestamp, What
> > > > do you suggest for that? An additional millisecond
> > > > field in the table?
> > > >
> > > > Thanks
> > > > Larry
> > >
>
> The timestamp format already supports ten-thousandths of seconds. A
> timestamp literal looks like this:subseconds
>
> '29.05.2004 10:42:15.5432'
>
> The problem you'll have is that the system date doesn't deliver
> to CURRENT_TIMESTAMP or 'NOW'. This (as I understand it) comes froma Unix
> limitation.the
>
> If you don't care about what the actual subsecond time was, but only
> order of things, you could store the system time in one field andpick a
> value off a generator for an associated unique ordering.Thanks Helen:
>
> /heLen
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.
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?
How do I get it?
Thanks
Larry