Focal Point
Dates

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2471054012

January 30, 2007, 04:51 PM
<Nate Conn>
Dates
Okay,

I have a date coming from oracle setup in my master file as in the snippet below (last field):

FILE=s060701, SUFFIX=SQLORA
SEGNAME=S060701, SEGTYPE=S0, $
FIELD=PIDM, ALIAS=PIDM, USAGE=P9, ACTUAL=P8, MISSING=ON, $
FIELD=HRS, ALIAS=HRS, USAGE=P6.2, ACTUAL=P8, MISSING=ON, $
FIELD=TERM, ALIAS=TERM, USAGE=A6V, ACTUAL=A6V, MISSING=ON, $
FIELD=PF, ALIAS=PF, USAGE=A1V, ACTUAL=A1V, MISSING=ON, $
FIELD=LASTNAME, ALIAS=LASTNAME, USAGE=A60V, ACTUAL=A60V, MISSING=ON, $
FIELD=FIRSTNAME, ALIAS=FIRSTNAME, USAGE=A15V, ACTUAL=A15V, MISSING=ON, $
FIELD=MIDDLE, ALIAS=MIDDLE, USAGE=A15V, ACTUAL=A15V, MISSING=ON, $
FIELD=ID, ALIAS=ID, USAGE=A9V, ACTUAL=A9V, MISSING=ON, $
FIELD=BIRTHDAY, ALIAS=BIRTHDAY, USAGE=HYYMDS, ACTUAL=HYYMDS, MISSING=ON, $

...

Now, I'm trying to format that date in both Report Painter and text editor. Nothing works. Getting actual/usage mismatch error, when I thought I could go into the master file tool and change the usage to what I like to see without formatting the date every time.


Also...
And get the following error when I have this as a line of code.

SET SQUEEZE ON
TABLE FILE S060701
PRINT LASTNAME/A25 FIRSTNAME SEX BIRTHDAY/MDYY ETHNIC



(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD:
BIRTHDAY


I've done searching here in the forums, tech support, and manuals. Please help.
I just want to format a date.

Thanks,
Nate

WEbFOCUS 7.1.4
January 30, 2007, 05:25 PM
N.Selph
Your field is a Date-Time Field (HYYMDS). You need to use Date-Time formats (ie HMDYY).


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
January 30, 2007, 06:14 PM
FrankDutch
More solutions...
1) in the master:
change
FIELD=BIRTHDAY, ALIAS=BIRTHDAY, USAGE=YYMD, ACTUAL=DATE, MISSING=ON, $
2) in a define
NEWBD/YYMD=HDATE(BIRTHDAY,YYMD);

This message has been edited. Last edited by: FrankDutch,




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 31, 2007, 06:57 AM
OPALTOSH
Change
FIELD=BIRTHDAY, ALIAS=BIRTHDAY, USAGE=HYYMDS, ACTUAL=HYYMDS, MISSING=ON, $
to
FIELD=BIRTHDAY, ALIAS=BIRTHDAY, USAGE=DMYY, ACTUAL=DATE, MISSING=ON, $
January 31, 2007, 10:18 AM
<Nate Conn>
I think I'll go with FrankDutch's second solution, except I needed quotes around the second parameter:

2) in a define
NEWBD/YYMD=HDATE(BIRTHDAY,'YYMD');

Thanks a bunch,
Nate