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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Webfocus returns incorrect date to c# app

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Webfocus returns incorrect date to c# app
 Login/Join
 
Gold member
posted
Hi,

Really odd problem. Within a c# app I submit .fex code using the httpwebrequest functionality, then wait for the response with httpwebresponse in an htmltable format (returned from webfoocus).

I have something similar to the following in the .fex file:


DEFINE FILE MYTABLE

DATE1/A8DMYY = '&DMYY';
DATE2/A10 = EDIT(DATE1,'99/99/9999');
DATE/A12 = IF DATE2 EQ ' ' THEN '#' | ERROR | '#' ELSE '#' | DATE2 | '#';

SDATE1/A8DMYY = MYTABLEDATE;
SDATE2/A10 = EDIT(SDATE1,'99/99/9999');
SDATE/A12 = IF SDATE2 EQ ' ' THEN '#' | ERROR | '#' ELSE '#' | SDATE2 | '#'; 

END

TABLE FILE
PRINT
CODE
DATE
SDATE
....
ON TABLE PCHOLD FORMAT HTMTABLE
END
 


The date I get back from webfocus for DATE is correct, but the date I get back for SDATE is #31/12/1900# without fail. The actual date should be #30/03/2010#.
When I run this code from webfocus developer studio is works as expected with both dates correct.

Can anyone suggest how I get webfocus to pass the correct date? or has anyone encountered this problem before? Could be that I am barking up the wrong tree and this is a c# problem, though I cannot see how ><.

Thanks,

Jinx.

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


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Report This Post
Gold member
posted Hide Post
I have tried the code below instead and got for the date this instead: # / / #. Weird!

TABLE FILE MYTABLE
PRINT
MYTABLEDATE
ON TABLE SAVE FORMAT ALPHA
END

-RUN
-READ SAVE &SDATE.A8. 
-TYPE &SDATE
-RUN

DEFINE FILE MYTABLE

DATE1/A8DMYY = '&DMYY';
DATE2/A10 = EDIT(DATE1,'99/99/9999');
DATE/A12 = IF DATE2 EQ ' ' THEN '#' | ERROR | '#' ELSE '#' | DATE2 | '#';

SDATE1/A8DMYY = '&SDATE';
SDATE2/A10 = EDIT(SDATE1,'99/99/9999');
SDATE/A12 = IF SDATE2 EQ ' ' THEN '#' | ERROR | '#' ELSE '#' | SDATE2 | '#'; 

END

TABLE FILE
PRINT
CODE
DATE
SDATE
....
ON TABLE PCHOLD FORMAT HTMTABLE
END

  


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Report This Post
Platinum Member
posted Hide Post
What happens when you try using WebFOCUS Web Services?
 
Posts: 229 | Location: New York | Registered: July 27, 2004Report This Post
Gold member
posted Hide Post
I get the same problem, that odd date coming through. *ponder*.

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


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Report This Post
Gold member
posted Hide Post
Thanks Efrem, your suggestion got me looking at the output before it arrived in c#. Seems I was somehow pulling in a NULL value. All sorted now.

Jinx.


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Report 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     [SOLVED] Webfocus returns incorrect date to c# app

Copyright © 1996-2020 Information Builders