68 lines
4.7 KiB
HTML
68 lines
4.7 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="Compare date, time, and timestamp using the Open Query File (OPNQRYF) command" />
|
|
<meta name="abstract" content="A date, time, or timestamp value can be compared either with another value of the same data type or with a string representation of that data type." />
|
|
<meta name="description" content="A date, time, or timestamp value can be compared either with another value of the same data type or with a string representation of that data type." />
|
|
<meta name="DC.subject" content="Open Query File (OPNQRYF) command, using, Date, time, and timestamp comparison, OPNQRYF (Open Query File) command, Date, time, and timestamp comparison" />
|
|
<meta name="keywords" content="Open Query File (OPNQRYF) command, using, Date, time, and timestamp comparison, OPNQRYF (Open Query File) command, Date, time, and timestamp comparison" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafoopnqf.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="rbafodttc" />
|
|
<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>Compare date, time, and timestamp using the Open Query File (OPNQRYF)
|
|
command</title>
|
|
</head>
|
|
<body id="rbafodttc"><a name="rbafodttc"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Compare date, time, and timestamp using the Open Query File (OPNQRYF)
|
|
command</h1>
|
|
<div><p>A date, time, or timestamp value can be compared either with another
|
|
value of the same data type or with a string representation of that data type. </p>
|
|
<p>All comparisons are chronological, which means the farther a time is from
|
|
January 1, 0001, the <em>greater</em> the value of that time. </p>
|
|
<p>Comparisons involving time values and string representations of time values
|
|
always include seconds. If the string representation omits seconds, zero seconds
|
|
are implied.</p>
|
|
<div class="p">Comparisons involving timestamp values are chronological without regard
|
|
to representations that might be considered equivalent. Thus, the following
|
|
predicate is true: <pre id="rbafodttc__rbafor3tmstp"><a name="rbafodttc__rbafor3tmstp"><!-- --></a></pre>
|
|
</div>
|
|
<p><strong>TIMESTAMP</strong> ('1990-02-23-00.00.00') > '1990-02-22-24.00.00'</p>
|
|
<p>When a character, DBCS-open, or DBCS-either field or constant is represented
|
|
as a date, time, or timestamp, the following rules apply:</p>
|
|
<p><strong>Date</strong>:
|
|
The length of the field or literal must be at least 8 if the date format is
|
|
*ISO, *USA, *EUR, *JIS, *YMD, *MDY, or *DMY. If the date format is *JUL (yyddd),
|
|
the length of the variable must be at least 6 (includes the separator between
|
|
yy and ddd). The field or literal can be padded with blanks.</p>
|
|
<p><strong>Time</strong>:
|
|
For all of the time formats (*USA, *ISO, *EUR, *JIS, *HMS), the length of
|
|
the field or literal must be at least 4. The field or literal can be padded
|
|
with blanks.</p>
|
|
<p><strong>Timestamp</strong>:
|
|
For the timestamp format (yyyy-mm-dd-hh.mm.ss.uuuuuu), the length of the field
|
|
or literal must be at least 16. The field or literal can be padded with blanks.</p>
|
|
</div>
|
|
<div>
|
|
<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> |