Difference between QUIZ and QTP
pickerij@norbord.com
pickerij@norbord.com
Fri, 20 Feb 1998 16:32:50 -0500
Leonard:
Looks like you simply want the julian date.
Why not use an item type of jdate??
As in:
define create-dte jdate = sysdate
John Pickering
JWP Systems Inc
Toronto
--------------------------------------------------------------------------
--
Original message:
On the HP3000, PH 7.09, with our dictionary set as follows:
02/20/98 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx Page
1
For DICTIONARY: PDH
Dictionary Name: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Created: On 02/03/98 By PDL 7.09.E
-- Date Options --
Century Included?: Yes Default Century: 19
Now consider the following code:
DEF FRSTYR INT*8 = NCONVERT(ASCII(FLOOR(SYSDATE/10000)) + "0101")
DEF CREATE-DTE CHAR*5 = ASCII(FRSTYR)[3:2] + ASCII((DAYS(SYSDATE) + &
1 - (DAYS(FRSTYR))),3)
For CREATE-DTE, QUIZ reports 98051 (what I want)
QTP writes 01051 (not what I want)
I can make QTP behave correctly by forcing the first ASCII to be 8
digits,
thus:
DEF FRSTYR INT*8 = NCONVERT(ASCII(FLOOR(SYSDATE/10000)) + "0101")
DEF CREATE-DTE CHAR*5 = ASCII(FRSTYR,8)[3:2] + ASCII((DAYS(SYSDATE) + &
1 - (DAYS(FRSTYR))),3)
^^^^^^^^^
FRSTYR, in QUIZ at least is 19980101 so it is 8 digits, and thus the
ASCII
function should default to 8.
Any comments?
By the way, I know that the 01 instead of 98 is the first 01 of 0101
because I ran the routine with 0203 and QTP wrote 02051.
Have a good weekend, all.
ffffff=Leonard S. Berkowitz
(work) Leonard_Berkowitz@hphc.org