Subject | Timestamp operations in stored procedure |
---|---|
Author | Marek Konitz |
Post date | 2005-06-28T08:20:07Z |
Hello,
Does somebody know how to substract one timestamp from the other in a
stored procedure?
We have variables:
TIME_DIFF timestamp;
TIME_START timestamp;
TIME_STOP timestamp;
and I would like to evaluate TIME_DIFF:
TIME_START - not null value;
TIME_STOP = 'now';
TIME_DIFF = TIME_STOP-TIME_START;
but such operation results an error:
Error Message:
----------------------------------------
Overflow occurred during data type conversion.
conversion error from string "0.072731481".
I know, that I'm suggested by Borland's TDateTime operations. I fact I
thought TDateTime and TIMESTAMP types are very similar in physical
structure.
Regards,
Marek Konitz
Does somebody know how to substract one timestamp from the other in a
stored procedure?
We have variables:
TIME_DIFF timestamp;
TIME_START timestamp;
TIME_STOP timestamp;
and I would like to evaluate TIME_DIFF:
TIME_START - not null value;
TIME_STOP = 'now';
TIME_DIFF = TIME_STOP-TIME_START;
but such operation results an error:
Error Message:
----------------------------------------
Overflow occurred during data type conversion.
conversion error from string "0.072731481".
I know, that I'm suggested by Borland's TDateTime operations. I fact I
thought TDateTime and TIMESTAMP types are very similar in physical
structure.
Regards,
Marek Konitz