Page 1 of 1

Duducting Some Minutes from a TIMESTAMP field

Posted: Sun Dec 19, 2004 10:17 pm
by bapajju
HI,

I have a timestamp field in the format as : yyyy-mm-dd hh24:mm:ss. Now I have another input field called MINUTES (Decimal (5,0)) and this field essentially contains values like 10,20,30... which are essentially number of minutes. I need to deduct this value from the timestamp field and put into an output field which is also an timestamp field. Kindly let me know how to achieve this.

Thanks in advance.

Posted: Sun Dec 19, 2004 11:07 pm
by kcbland
You'll have to write your own. You may want to look here:
viewtopic.php?t=85788
to get a headstart. This function subtracts two timestamps. You basically have to subtract minutes and deal with rolling under hours and potentially days. Write a good function and post it for all to share! :D

Posted: Wed Dec 22, 2004 5:40 am
by bapajju
Yup Boss. I will. Thanks for the help. Appreciate your help.
kcbland wrote:You'll have to write your own. You may want to look here:
viewtopic.php?t=85788
to get a headstart. This function subtracts two timestamps. You basically have to subtract minutes and deal with rolling under hours and potentially days. Write a good function and post it for all to share! :D

Posted: Wed Dec 22, 2004 5:51 am
by ogmios
If both the date and minutes come from the same database and the calculation is not complex, do the calculation in the database :wink:

Ogmios