Date calculations

Kristina Carlton Kristina.Carlton@JICompanies.com
Wed, 2 Feb 2005 10:11:59 -0600


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C50941.ECC2BA20
Content-Type: text/plain;
	charset="iso-8859-1"

Yesterday some emails were exchanged on calculating dates and that "DATE -
1" came up with an incorrect date of 02.00.2005. I calculate my date with
the following syntax:
 
DEFINE RUNDT DATE    = DATE(DAYS(SYSDATE - 1))
 
This has worked every night except yesterday - February 1st. When I display
RUNDT it actually has Januray 31st, 2005 but when I run the extract I get
zero records. If I hard code January 31st, 2005 I do get records back. Am I
doing something wrong? I got my data, but I would like to understand why
this is happening.
 
We have OpenVMS V7.3-2 and I am using a Quiz extract.
 
Thanks,
Kristina Carlton
Senior Programmer/Analyst
The JI Companies
Kristina.Carlton@JICompanies.com
 

------_=_NextPart_001_01C50941.ECC2BA20
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 9">
<meta name=3DOriginator content=3D"Microsoft Word 9">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C5090F.A1BA0790">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:DrawingGridHorizontalSpacing>2.85 =
pt</w:DrawingGridHorizontalSpacing>
  =
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>=

 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
@font-face
	{font-family:"Century Gothic";
	panose-1:2 11 5 2 2 2 2 2 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:647 0 0 0 159 0;}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:9.0pt;
	mso-bidi-font-size:12.0pt;
	font-family:"Century Gothic";
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:Arial;
	color:black;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
	{margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:9.0pt;
	mso-bidi-font-size:12.0pt;
	font-family:"Century Gothic";
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:Arial;
	color:black;}
span.EmailStyle15
	{mso-style-type:personal-compose;
	mso-ansi-font-size:9.0pt;
	mso-ascii-font-family:"Century Gothic";
	mso-hansi-font-family:"Century Gothic";
	mso-bidi-font-family:Arial;
	color:navy;
	font-weight:normal;
	font-style:normal;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
</head>

<body lang=3DEN-US style=3D'tab-interval:.5in'>

<div class=3DSection1>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><span =
style=3D'mso-bidi-font-size:
12.0pt'>Yesterday some emails were exchanged on calculating dates and =
that &#8220;DATE
&#8211; 1&#8221; came up with an incorrect date of 02.00.2005. I =
calculate my date with the
following syntax:<o:p></o:p></span></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><![if =
!supportEmptyParas]>&nbsp;<![endif]></span><o:p></o:p></font></span></p>=


<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><span =
style=3D'mso-bidi-font-size:
12.0pt'>DEFINE RUNDT DATE<span style=3D"mso-spacerun: =
yes">&nbsp;&nbsp;&nbsp;
</span>=3D DATE(DAYS(SYSDATE - =
1))<o:p></o:p></span></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><![if =
!supportEmptyParas]>&nbsp;<![endif]></span><o:p></o:p></font></span></p>=


<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><span =
style=3D'mso-bidi-font-size:
12.0pt'>This has worked every night except yesterday &#8211; February =
1<sup>st</sup>.
When I display RUNDT it actually has Januray 31<sup>st</sup>, 2005 but =
when I
run the extract I get zero records. If I hard code January =
31<sup>st</sup>,
2005 I do get records back. Am I doing something wrong? I got my data, =
but I
would like to understand why this is =
happening.<o:p></o:p></span></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><![if =
!supportEmptyParas]>&nbsp;<![endif]></span><o:p></o:p></font></span></p>=


<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><span =
style=3D'mso-bidi-font-size:
12.0pt'>We have OpenVMS V7.3-2 and I am using a Quiz =
extract.<o:p></o:p></span></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><![if =
!supportEmptyParas]>&nbsp;<![endif]></span><o:p></o:p></font></span></p>=


<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><span =
style=3D'mso-bidi-font-size:
12.0pt'>Thanks,<o:p></o:p></span></span></font></span></p>

<p class=3DMsoNormal><!--[if supportFields]><span =
style=3D'mso-element:field-begin'></span><span=20
style=3D"mso-spacerun: yes">&nbsp;</span>AUTOTEXTLIST \s &quot;E-mail=20
Signature&quot; <span =
style=3D'mso-element:field-separator'></span><![endif]--><span
class=3DEmailStyle15><font color=3Dnavy>Kristina =
Carlton<o:p></o:p></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><span =
style=3D'mso-bidi-font-size:
12.0pt'>Senior =
Programmer/Analyst<o:p></o:p></span></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><span =
style=3D'mso-bidi-font-size:
12.0pt'>The JI Companies<o:p></o:p></span></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D1 =
color=3Dnavy
face=3D"Century Gothic"><span style=3D'font-size:9.0pt'><span =
style=3D'mso-bidi-font-size:
12.0pt'>Kristina.Carlton@JICompanies.com<o:p></o:p></span></span></font>=
</span></p>

<p class=3DMsoNormal><!--[if supportFields]><span =
style=3D'mso-element:field-end'></span><![endif]--><![if =
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>

</div>

</body>

</html>

------_=_NextPart_001_01C50941.ECC2BA20--