<p>!_NEWLINE_!sql.Time and Mathematical Operators!_NEWLINE_!</p>
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Guido_Gonni
Posted On:   Wednesday, November 21, 2001 02:10 AM

Hi everybody!


My question is:


is it possible to subtract (or add) two sql.Time (e.g. HH:mm:ss) values?


If it is, would you provide me with some example code?

Re: <p>!_NEWLINE_!sql.Time and Mathematical Operators!_NEWLINE_!</p>

Posted By:   Bernie_Acs  
Posted On:   Friday, November 23, 2001 08:45 AM

Consider using seconds only then math operations make sence and work well because the values are simply treated as long. The sql.Time is a subclass of Date and there are a number of approaches to calculating time diffs, but norm is conversion of operand values to seconds, then doing the math ops, and finally converting the resultant to the desired representation.
About | Sitemap | Contact