Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     WHERE stmt using HYYMDS date format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
WHERE stmt using HYYMDS date format
 Login/Join
 
<bapper>
posted
I am trying to use a where stmt and compare my oracle date field (ACCT_D) to today's system date or yesterday, or the day before, etc. The field is in HYYMDS format. It looks like this 2004/08/24 00:00:00AM

I need to say something like "WHERE ACCT_D EQ &YYMD", but this does not work.

Can anybody help?
 
Report This Post
Expert
posted Hide Post
You need to get your system variable into the same format, so the only way i know to do that is to define a variable in the ds you're reading:

NEWTIME/HYYMDIA WITH somevar=DT(&YYMD 00:00AM);
NICEDAY/HYYMDS = NEWTIME;

Then your variable NICEDAY can be compared to your db variable, both in dt format, if that's what you need to do.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Pietro De Santis>
posted
You could do this:

-SET &FR_DT = EDIT(&YYMD,'9999-99-99') || '-00.00.00.000000';
-SET &TO_DT = EDIT(&YYMD,'9999-99-99') || '-23.59.59.999999';

WHERE ACCT_D FROM '&FR_DT' TO '&TO_DT'
 
Report This Post
Member
posted Hide Post
As you know, the Oracle date type is really a date-time-stamp. If you want WebFocus to treat the Oracle date field as format YYMD/DATE instead of format HYYMDS, you can simply add the following line to your server profile (EDASPROF.PRF) ...

SQL SQLORA SET DATETIME OFF
 
Posts: 26 | Location: Mercy College | Registered: May 06, 2003Report This Post
Guru
posted Hide Post
In an application where selection is done by comparing an H-format date to an &VAR such as
YYYY/MM/DD HH:MM:SS.mmmmmm
, give this a shot:

WHERE H_FORMAT_DATE GE DT (&VAR)

Note the DT, it tells WebFOCUS (or FOCUS) to make the proper comparison.

HTH
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     WHERE stmt using HYYMDS date format

Copyright © 1996-2020 Information Builders