75 lines
6.4 KiB
HTML
75 lines
6.4 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="Perform date, time, and timestamp arithmetic using the Open Query File (OPNQRYF) command" />
|
|
<meta name="abstract" content="Date, time, and timestamp values can be incremented, decremented, and subtracted. These operations might involve decimal numbers called durations. These topics include a definition of durations and a specification of the rules for performing arithmetic operations on date, time, and timestamp values." />
|
|
<meta name="description" content="Date, time, and timestamp values can be incremented, decremented, and subtracted. These operations might involve decimal numbers called durations. These topics include a definition of durations and a specification of the rules for performing arithmetic operations on date, time, and timestamp values." />
|
|
<meta name="DC.subject" content="Open Query File (OPNQRYF) command, using, Date, time, and timestamp arithmetic, OPNQRYF (Open Query File) command, Date, time, and timestamp arithmetic" />
|
|
<meta name="keywords" content="Open Query File (OPNQRYF) command, using, Date, time, and timestamp arithmetic, OPNQRYF (Open Query File) command, Date, time, and timestamp arithmetic" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafoopnqf.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafodttadur.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafodttarul.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafodsubtr.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafodincr.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafotsubtr.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafotincr.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafotssubtr.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafotsincr.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rbafodttaopq" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Perform date, time, and timestamp arithmetic using the Open Query File
|
|
(OPNQRYF) command</title>
|
|
</head>
|
|
<body id="rbafodttaopq"><a name="rbafodttaopq"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Perform date, time, and timestamp arithmetic using the Open Query File
|
|
(OPNQRYF) command</h1>
|
|
<div><p>Date, time, and timestamp values can be incremented, decremented,
|
|
and subtracted. These operations might involve decimal numbers called <em>durations</em>.
|
|
These topics include a definition of durations and a specification
|
|
of the rules for performing arithmetic operations on date, time, and timestamp
|
|
values.</p>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rbafodttadur.htm">Durations</a></strong><br />
|
|
A <em>duration</em> is a number representing an interval of time.
|
|
This topic introduces various types of durations.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafodttarul.htm">Rules for date, time, and timestamp arithmetic</a></strong><br />
|
|
The only arithmetic operations that can be performed on date and time values are addition and subtraction. If a date or time value is the operand of addition, the other operand must be a duration. This topic describes rules for performing date, time and timestamp arithmetic.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafodsubtr.htm">Subtract dates</a></strong><br />
|
|
The result of subtracting one date (DATE2) from another (DATE1) is a date duration that specifies the number of years, months, and days between the two dates.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafodincr.htm">Increment and decrement dates</a></strong><br />
|
|
The result of adding a duration to a date, or of subtracting a duration from a date, is itself a date.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafotsubtr.htm">Subtract times</a></strong><br />
|
|
The result of subtracting one time (TIME2) from another (TIME1) is a time duration that specifies the number of hours, minutes, and seconds between the two times.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafotincr.htm">Increment and decrement times</a></strong><br />
|
|
The result of adding a duration to a time, or of subtracting a duration from a time, is itself a time. Any overflow or underflow of hours is discarded, thereby ensuring that the result is always a time.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafotssubtr.htm">Subtract timestamps</a></strong><br />
|
|
The result of subtracting one timestamp (TS2) from another (TS1) is a timestamp duration that specifies the number of years, months, days, hours, minutes, seconds, and microseconds between the two timestamps.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafotsincr.htm">Increment and decrement timestamps</a></strong><br />
|
|
The result of adding a duration to a timestamp, or of subtracting a duration from a timestamp, is itself a timestamp.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafoopnqf.htm" title="The Open Query File (OPNQRYF) command is a control language (CL) command that allows you to perform many data processing functions on database files. These topics discuss how to create a query using the OPNQRYF command, how to specify parameters for its major functions, and how to use it with your high-level language program.">Use Open Query File (OPNQRYF) command</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |