Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Excel doesn't like DB2 Date Default : 0001-01-01
Go
New
Search
Notify
Tools
Reply
  
Excel doesn't like DB2 Date Default : 0001-01-01
 Login/Join
 
Platinum Member
posted
Bonjour,
Excel did not much appreciate Smart Dates coming indirectly out of DB2 (Usage = YY-M-D, Actual = A10 ).
So I translated the Default DB2 Date 0001-01-01 to the Basis of Focus Smart Date
with Proper SET DATEDISPLAY, Excel appreciates the 0 Focus Date, much better than DB2 Date origin...

( Those Dates cannot be both significant and before the beginning of Last century.
My memory doesn't try to remember 01/01/1900 or 31/12/1900 or 01/01/1901,
since Builtin like AYMD and Smart Dates disagree on this matter : 0 is the Basis in my mind )

The point is that I use numeric constant (Without Quote), so Focus does not start converting strings into Smart Date.
He knows that I know that Smart Date is a Number of Days. He trusts me and does what I want ...
At least I hope so. Please tell me if you detect a mistake.

WDATE_EC /YY-M-D = IF DATE_EC GE 1 THEN DATE_EC
ELSE 0 ;
WDATE_CRJ /YY-M-D = IF DATE_CRJ GE 1 THEN DATE_CRJ
ELSE 0 ;
WDATE_CEN /YY-M-D = IF DATE_CEN GE 1 THEN DATE_CEN
ELSE 0 ;
WDATE_FAB /YY-M-D = IF DATE_FAB GE 1 THEN DATE_FAB
ELSE 0 ;
WDATE_STO /YY-M-D = IF DATE_STO GE 1 THEN DATE_STO
ELSE 0 ;

Perhaps this 'Focuserie' (*) can help someone

Cordially and Focusely

(*) All langages have tips and techniques that appear Absurd or Crazy to those who do not yet master the langage.
And tend to appear as 'Natural' to those who have been sharing the life of this langage long enough.
Some times, when those crazy things are deep in their brains, they call themselves 'expert', which often occurs to be true .

X = X + 1 ; is the first craziness I met, a long time ago ...

It was 'Some poetry in this world of Brutes' approximately by Lindt


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
 
Posts: 134 | Registered: November 06, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Excel doesn't like DB2 Date Default : 0001-01-01

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.