weird stuff with dates in PH 7.10G1
Robert J.M. Edis
robert.edis@creatcomp.com
Fri, 23 Apr 1999 09:15:22 -0400
G'day all
I was working on an issue for a client who had upgraded from 6.10e to 7.10g1
and discovered a couple of things.
In 6.n I could view the value of a date field in Quiz using REP mydate PIC
"^^^^^^^^" but in 7.10 I can't. In fact, 7.10g1 will give me a compile
error if a FIELD statement has a PICTURE clause with it in Qdesign. I can
live with these changes.
The other issue was a subscripting problem. A screen is doing a LET on a
TEMP item. This statement is creating a string that contains two dates.
Here is the syntax:
TEMP mystring CHAR*60
LET mystring = "This date is in MMDDYY format: (" + ASCII(date1)[5:3] &
+ "/" + ASCII(date1)[7:2] + "/" ASCII(date1)[3:2] + ")"
The value stored in date1 is 19990301 (PHD is century included).
The result was "This date is in MMDDYY format: (01/ /03)".
To get around this I created a separate DEFINE to get the date as a CHAR and
using DATEEXTRACT(). E.g.
DEFINE d_date1 CHAR*10 = "(" + ASCII(DATEEXTRACT(date1,MONTH),2) + "/" &
+ ASCII(DATEEXTRACT(date1,DAY),2) + "/" &
+ ASCII(DATEEXTRACT(date1,YEAR),4)[3:2] + ")"
LET mystring = "This date is in MMDDYY format: " + d_date1
The result now is "This date is in MMDDYY format: (03/01/99)", as it should
be.
Any ideas?
Blue
PowerHouse consultant
Rhode Island, USA
Disclaimer:
The opinions and ideas expressed in this message are my own and have no
relationship to my current employer, Initial Technical Staffing, its client
CCI, or any of CCI's clients.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.