Date calculations

Deskin, Bob Bob.Deskin@Cognos.COM
Thu, 3 Feb 2005 09:22:04 -0500


This is a multi-part message in MIME format.

------_=_NextPart_001_01C509FB.BBD8B0F2
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

The base date parameter of DATE has been on OpenVMS since the series 6
days but I don't think it got to MPE/iX and UNIX until series 7.
=20
Bob

	-----Original Message-----
	From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Fyfield, Derek
	Sent: February 3, 2005 4:09 AM
	To: Lloyd, Gavin; Fyfield, Derek; powerh-l@lists.sowder.com
	Subject: RE: Date calculations
=09
=09

	Gavin, =20

	=20

	The sites I have worked at have used v7.10 on VMS for the last
seven years at least,  and this version has the form of the DATE
function in question.  I can't remember how it was when I worked with
QUIZ on HP in 1982.  Memory fades with age and I can't remember when
mine started to do so!

	=20

	Regards,

	=20

	Derek.

	=20

=09
________________________________


	From: Lloyd, Gavin [mailto:gavin.lloyd@fmglobal.com]=20
	Sent: Thursday, February 03, 2005 10:41 AM
	To: Fyfield, Derek; powerh-l@lists.sowder.com
	Subject: RE: Date calculations

	=20

	Derek,

	=20

	I agree that the syntax you have used is more readable and it's
part of the date function that I had not realised was there.  The system
I'm working on has been around since about 1985 and inherent through the
code is the 'date(days(sysdate)-1)' type of calculation which more than
anything is less efficient than 'date(-1, sysdate)'.  Is this feature a
recent edition? (remember I'm talking the last 20 years!!!!).

	=20

	Thanks for teaching a 'not too old a dog' a new trick.  (I did
spot your previous message about this feature).

	=20

	Regards,

	Gavin.=20

		-----Original Message-----
		From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Fyfield, Derek
		Sent: 03 February 2005 06:05
		To: Kristina Carlton; 'powerh-l@lists.sowder.com'
		Subject: RE: Date calculations

		The centre ot the expression in your example is "sysdate
- 1", and this syntax is not always going to yield a true date. I would
use the following as it makes the expression simpler to read and
reliable too.

		=20

		DEFINE RUNDT DATE    =3D DATE(-1, sysdate)

		=20

		The DATE function takes two arguments.  The first is a
numeric expression (here it is -1) and the second is a base date (and
here it is sysdate).

		=20

		Regards,

		=20

		Derek.

		=20

		=20

	=09
________________________________


		From: Kristina Carlton
[mailto:Kristina.Carlton@JICompanies.com]=20
		Sent: Wednesday, February 02, 2005 7:12 PM
		To: 'powerh-l@lists.sowder.com'
		Subject: Date calculations

		=20

		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:

		=20

		DEFINE RUNDT DATE    =3D DATE(DAYS(SYSDATE - 1))

		=20

		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.

		=20

		We have OpenVMS V7.3-2 and I am using a Quiz extract.

		=20

		Thanks,

		Kristina Carlton

		Senior Programmer/Analyst

		The JI Companies

		Kristina.Carlton@JICompanies.com

		=20

		=20

		This message and any attachments (the 'message') is
intended solely for the addressees and is confidential. If you receive
this message in error, please delete it and immediately notify the
sender. Any use not in accord with its purpose, any dissemination or
disclosure, either whole or partial, is prohibited, except with formal
approval. The Internet cannot guarantee the integrity of this message.
Orbit (and its subsidiaries) shall therefore not be liable for the
message, if modified. Orbit accepts no liability for any damage caused
by any error or virus transmitted by this email.

		=20



	This message and any attachments (the 'message') is intended
solely for the addressees and is confidential. If you receive this
message in error, please delete it and immediately notify the sender.
Any use not in accord with its purpose, any dissemination or disclosure,
either whole or partial, is prohibited, except with formal approval. The
Internet cannot guarantee the integrity of this message. Orbit (and its
subsidiaries) shall therefore not be liable for the message, if
modified. Orbit accepts no liability for any damage caused by any error
or virus transmitted by this email.=20
 =20
       This message may contain privileged and/or confidential =
information.  If you have received this e-mail in error or are not the =
intended recipient, you may not use, copy, disseminate or distribute it; =
do not open any attachments, delete it immediately from your system and =
notify the sender promptly by e-mail that you have done so.  Thank you.=20
=20

------_=_NextPart_001_01C509FB.BBD8B0F2
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<HTML xmlns:eXclaimer=3D"http://www.exclaimer.co.uk">
<HEAD>
<META http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3DUTF-16">
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUTF-16"><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR><!--[if !mso]>
<STYLE>v\:* {
	BEHAVIOR: url(#default#VML)
}
o\:* {
	BEHAVIOR: url(#default#VML)
}
w\:* {
	BEHAVIOR: url(#default#VML)
}
.shape {
	BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
	font-family: Tahoma;
}
@font-face {
	font-family: Century Gothic;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
	FONT-SIZE: 9pt; MARGIN: 0in 0in 0pt; COLOR: black; FONT-FAMILY: =
"Century Gothic"
}
LI.MsoNormal {
	FONT-SIZE: 9pt; MARGIN: 0in 0in 0pt; COLOR: black; FONT-FAMILY: =
"Century Gothic"
}
DIV.MsoNormal {
	FONT-SIZE: 9pt; MARGIN: 0in 0in 0pt; COLOR: black; FONT-FAMILY: =
"Century Gothic"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline
}
P.MsoAutoSig {
	FONT-SIZE: 9pt; MARGIN: 0in 0in 0pt; COLOR: black; FONT-FAMILY: =
"Century Gothic"
}
LI.MsoAutoSig {
	FONT-SIZE: 9pt; MARGIN: 0in 0in 0pt; COLOR: black; FONT-FAMILY: =
"Century Gothic"
}
DIV.MsoAutoSig {
	FONT-SIZE: 9pt; MARGIN: 0in 0in 0pt; COLOR: black; FONT-FAMILY: =
"Century Gothic"
}
P {
	FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: =
"Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
	FONT-WEIGHT: normal; COLOR: navy; FONT-STYLE: normal; FONT-FAMILY: =
"Century Gothic"; mso-style-type: personal
}
SPAN.EmailStyle19 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle21 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
	page: Section1
}
</STYLE>
</HEAD><BODY lang=3DEN-US vLink=3Dpurple link=3Dblue><DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D268582014-03022005>The=20
base date parameter of DATE has been on OpenVMS since the series 6 days =
but I=20
don't think it got to MPE/iX and UNIX until series =
7.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D268582014-03022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D268582014-03022005>Bob</SPAN></FONT></DIV>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr =
align=3Dleft><FONT=20
  face=3DTahoma size=3D2>-----Original Message-----<BR><B>From:</B>=20
  powerh-l-admin@lists.sowder.com =
[mailto:powerh-l-admin@lists.sowder.com] <B>On=20
  Behalf Of </B>Fyfield, Derek<BR><B>Sent:</B> February 3, 2005 4:09=20
  AM<BR><B>To:</B> Lloyd, Gavin; Fyfield, Derek;=20
  powerh-l@lists.sowder.com<BR><B>Subject:</B> RE: Date=20
  calculations<BR><BR></FONT></DIV>
  <DIV class=3DSection1>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Gavin,&nbsp;=20
  <o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The sites I =
have=20
  worked at have used v7.10 on VMS for the last seven years at least, =
&nbsp;and=20
  this version has the form of the DATE function in question.&nbsp; I =
can&#8217;t=20
  remember how it was when I worked with QUIZ on HP in 1982.&nbsp; =
Memory fades=20
  with age and I can&#8217;t remember when mine started to do=20
  so!<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Regards,<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Derek.<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV>
  <DIV class=3DMsoNormal style=3D"TEXT-ALIGN: center" =
align=3Dcenter><FONT=20
  face=3D"Times New Roman" color=3Dblack size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'">
  <HR tabIndex=3D-1 align=3Dcenter width=3D"100%" SIZE=3D2>
  </SPAN></FONT></DIV>
  <P class=3DMsoNormal><B><FONT face=3DTahoma color=3Dblack =
size=3D2><SPAN=20
  style=3D"FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: windowtext; =
FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT=20
  face=3DTahoma color=3Dblack size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: windowtext; FONT-FAMILY: Tahoma"> =
Lloyd, Gavin=20
  [mailto:gavin.lloyd@fmglobal.com] <BR><B><SPAN=20
  style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> Thursday, February 03, =
2005 10:41=20
  AM<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B> Fyfield, =
Derek;=20
  powerh-l@lists.sowder.com<BR><B><SPAN=20
  style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B> RE: Date=20
  calculations</SPAN></FONT><FONT face=3D"Times New Roman" color=3Dblack =

  size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p></o:p></SPAN></FONT></P></DIV>
  <P class=3DMsoNormal><FONT face=3D"Century Gothic" color=3Dblack =
size=3D1><SPAN=20
  style=3D"FONT-SIZE: 9pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DTahoma color=3Dblue size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Tahoma">Derek,</SPAN></FONT><FONT=20
  face=3D"Times New Roman" color=3Dblack size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" color=3Dblack =
size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DTahoma color=3Dblue size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Tahoma">I agree =
that the=20
  syntax you have used is more readable and it's part of the date =
function that=20
  I had not realised was there.&nbsp; The system I'm working on has been =
around=20
  since about 1985 and inherent through the code is the =
'date(days(sysdate)-1)'=20
  type of calculation which more than anything is less efficient than =
'date(-1,=20
  sysdate)'.&nbsp; Is this feature a recent edition? (remember I'm =
talking the=20
  last 20 years!!!!).</SPAN></FONT><FONT face=3D"Times New Roman" =
color=3Dblack=20
  size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" color=3Dblack =
size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DTahoma color=3Dblue size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Tahoma">Thanks for =
teaching=20
  a 'not too old a dog' a new trick.&nbsp; (I did spot your previous =
message=20
  about this feature).</SPAN></FONT><FONT face=3D"Times New Roman" =
color=3Dblack=20
  size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" color=3Dblack =
size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DTahoma color=3Dblue size=3D2><SPAN =
lang=3DEN-GB=20
  style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Tahoma">Regards,</SPAN></FONT><FONT=20
  face=3D"Times New Roman" color=3Dblack size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DTahoma color=3Dblue size=3D2><SPAN =
lang=3DEN-GB=20
  style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Tahoma">Gavin.</SPAN></FONT><FONT=20
  face=3D"Times New Roman" color=3Dblack size=3D3><SPAN lang=3DEN-GB=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'">=20
  </SPAN></FONT><FONT face=3D"Times New Roman" color=3Dblack =
size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p></o:p></SPAN></FONT></P></DIV>
  <BLOCKQUOTE style=3D"MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt; =
MARGIN-RIGHT: 0in">
    <P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3DTahoma color=3Dblack=20
    size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: windowtext; FONT-FAMILY: =
Tahoma">-----Original=20
    Message-----<BR><B><SPAN style=3D"FONT-WEIGHT: =
bold">From:</SPAN></B>=20
    powerh-l-admin@lists.sowder.com =
[mailto:powerh-l-admin@lists.sowder.com]=20
    <B><SPAN style=3D"FONT-WEIGHT: bold">On Behalf Of =
</SPAN></B>Fyfield,=20
    Derek<BR><B><SPAN style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> 03 =
February=20
    2005 06:05<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B> =
Kristina=20
    Carlton; 'powerh-l@lists.sowder.com'<BR><B><SPAN=20
    style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B> RE: Date=20
    calculations</SPAN></FONT><FONT face=3D"Times New Roman" =
color=3Dblack=20
    size=3D3><SPAN=20
    style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The =
centre ot the=20
    expression in your example is &#8220;sysdate &#8211; 1&#8221;, and =
this syntax is not always=20
    going to yield a true date. I would use the following as it makes =
the=20
    expression simpler to read and reliable =
too.<o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">DEFINE =
RUNDT=20
    DATE&nbsp;&nbsp;&nbsp; =3D DATE(-1, =
sysdate)<o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The DATE =
function=20
    takes two arguments.&nbsp; The first is a numeric expression (here =
it is -1)=20
    and the second is a base date (and here it is=20
    sysdate).<o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Regards,<o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Derek.<o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <DIV>
    <DIV class=3DMsoNormal style=3D"TEXT-ALIGN: center" =
align=3Dcenter><FONT=20
    face=3D"Times New Roman" color=3Dblack size=3D3><SPAN=20
    style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'">
    <HR tabIndex=3D-1 align=3Dcenter width=3D"100%" SIZE=3D2>
    </SPAN></FONT></DIV>
    <P class=3DMsoNormal><B><FONT face=3DTahoma color=3Dblack =
size=3D2><SPAN=20
    style=3D"FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: windowtext; =
FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT=20
    face=3DTahoma color=3Dblack size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: windowtext; FONT-FAMILY: Tahoma"> =
Kristina=20
    Carlton [mailto:Kristina.Carlton@JICompanies.com] <BR><B><SPAN=20
    style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, February 02, =
2005 7:12=20
    PM<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B>=20
    'powerh-l@lists.sowder.com'<BR><B><SPAN=20
    style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B> Date=20
    calculations</SPAN></FONT><FONT face=3D"Times New Roman" =
color=3Dblack=20
    size=3D3><SPAN=20
    style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p></o:p></SPAN></FONT></P></DIV>
    <P class=3DMsoNormal><FONT face=3D"Century Gothic" color=3Dblack =
size=3D1><SPAN=20
    style=3D"FONT-SIZE: 7.5pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN style=3D"FONT-SIZE: 9pt">Yesterday some =
emails were=20
    exchanged on calculating dates and that &#8220;DATE &#8211; 1&#8221; =
came up with an incorrect=20
    date of 02.00.2005. I calculate my date with the following=20
    syntax:<o:p></o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN=20
    style=3D"FONT-SIZE: =
7.5pt"><o:p>&nbsp;</o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN style=3D"FONT-SIZE: 9pt">DEFINE RUNDT=20
    DATE&nbsp;&nbsp;&nbsp; =3D DATE(DAYS(SYSDATE -=20
    1))<o:p></o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN=20
    style=3D"FONT-SIZE: =
7.5pt"><o:p>&nbsp;</o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN style=3D"FONT-SIZE: 9pt">This has worked =
every night=20
    except yesterday &#8211; February 1<SUP>st</SUP>. When I display =
RUNDT it actually=20
    has Januray 31<SUP>st</SUP>, 2005 but when I run the extract I get =
zero=20
    records. If I hard code January 31<SUP>st</SUP>, 2005 I do get =
records back.=20
    Am I doing something wrong? I got my data, but I would like to =
understand=20
    why this is happening.<o:p></o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN=20
    style=3D"FONT-SIZE: =
7.5pt"><o:p>&nbsp;</o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN style=3D"FONT-SIZE: 9pt">We have OpenVMS =
V7.3-2 and I=20
    am using a Quiz extract.<o:p></o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN=20
    style=3D"FONT-SIZE: =
7.5pt"><o:p>&nbsp;</o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN=20
    style=3D"FONT-SIZE: 9pt">Thanks,<o:p></o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN style=3D"FONT-SIZE: 9pt">Kristina=20
    Carlton<o:p></o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN style=3D"FONT-SIZE: 9pt">Senior=20
    Programmer/Analyst<o:p></o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN style=3D"FONT-SIZE: 9pt">The JI=20
    Companies<o:p></o:p></SPAN></FONT></SPAN></P>
    <P class=3DMsoNormal><SPAN class=3DEmailStyle18><FONT =
face=3D"Century Gothic"=20
    color=3Dnavy size=3D1><SPAN=20
    style=3D"FONT-SIZE: =
9pt">Kristina.Carlton@JICompanies.com<o:p></o:p></SPAN></FONT></SPAN></P>=

    <P class=3DMsoNormal><FONT face=3D"Century Gothic" color=3Dblack =
size=3D1><SPAN=20
    style=3D"FONT-SIZE: 9pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3D"Times New Roman"=20
    color=3Dblack size=3D3><SPAN=20
    style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P><I><FONT face=3DArial size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; FONT-STYLE: italic; FONT-FAMILY: =
Arial">This message=20
    and any attachments (the 'message') is intended solely for the =
addressees=20
    and is confidential. If you receive this message in error, please =
delete it=20
    and immediately notify the sender. Any use not in accord with its =
purpose,=20
    any dissemination or disclosure, either whole or partial, is =
prohibited,=20
    except with formal approval. The Internet cannot guarantee the =
integrity of=20
    this message. Orbit (and its subsidiaries) shall therefore not be =
liable for=20
    the message, if modified. Orbit accepts no liability for any damage =
caused=20
    by any error or virus transmitted by this=20
    email.</SPAN></FONT></I><o:p></o:p></P>
    <P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3D"Times New Roman"=20
    color=3Dblack size=3D3><SPAN=20
    style=3D"FONT-SIZE: 12pt; COLOR: windowtext; FONT-FAMILY: 'Times New =
Roman'"><o:p>&nbsp;</o:p></SPAN></FONT></P></BLOCKQUOTE></DIV><BR><BR>
  <P><I><FONT face=3DArial size=3D2>This message and any attachments =
(the 'message')=20
  is intended solely for the addressees and is confidential. If you =
receive this=20
  message in error, please delete it and immediately notify the sender. =
Any use=20
  not in accord with its purpose, any dissemination or disclosure, =
either whole=20
  or partial, is prohibited, except with formal approval. The Internet =
cannot=20
  guarantee the integrity of this message. Orbit (and its subsidiaries) =
shall=20
  therefore not be liable for the message, if modified. Orbit accepts no =

  liability for any damage caused by any error or virus transmitted by =
this=20
  email.</FONT></I></P><BR><BR></BLOCKQUOTE></DIV>
<DIV>&nbsp;</DIV>
<DIV>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT FACE=3D"Arial" =
SIZE=3D"2">This message may contain privileged and/or confidential =
information.&nbsp; If you have received this e-mail in error or are not =
the intended recipient, you may not use, copy, disseminate or distribute =
it; do not open any attachments, delete it immediately from your system =
and notify the sender promptly by e-mail that you have done so.&nbsp; =
Thank you.</FONT>
</P>
</DIV></BODY></HTML>

------_=_NextPart_001_01C509FB.BBD8B0F2--