The start date and time and stop date and time fields in my DB is numeric (length of date fields are 8 and that...
of time field is 6.). I have to calculate duration for each record and return as a result dataset (with other fields) from a stored procedure. How can I do this? You would have to break the dates and times into the pieces, multiply them into seconds and subtract, giving you the seconds, then divide to get the pieces back together. Alternatively, I would suggest calling an RPG or other HLL program inside the stored procedure to calculate the difference or use a different method altogether.
MORE INFORMATION ON THIS TOPIC
Check out this Search400.com Featured Topic: Database issues resolved
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: Tips, tutorials and more.
Dig Deeper on DB2 UDB (universal databases)
Related Q&A from John Brandt
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.