Re: Compute Date Duration
"Beppe Costa" <[email protected]>
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <[email protected]> |
The right value for "DDAT_Size" should be (2*DDAT lng) + (4 + 2 + 10 + 4 + 4) = 256 But it seems to work with any value. DDAT2 and DDAT3 are the same and should be 116 ----- Original Message ----- From: "Njål Fisketjøn" <njal.fisketjon-gyXR7Lt7FVk/[email protected]> To: "MI Programming on the AS400 / iSeries" <mi400-Zwy7GipZuJhWk0Htik3J/[email protected]> Sent: Monday, October 17, 2005 1:28 PM Subject: RE: [MI400] Compute Date Duration > Beppe Costa wrote: > > > For those who are interested to explore the MI builtin _CDD, the code > > follows. > > > > It returns a duration in the format 8,0 Pack. In this case the returned > > value is 00501130 (that is 50 years + 11 month + 30 days). > > > > Than, how can I convert this figure to a number of days ? > > > > I've also tried to use CVTD but always unsuccesfully. > > > > The MI reference specifies that the Data Definitional Attribute Template is 112-N bytes long, > but if I add the lengths of all fields I get 100 bytes as a minimum length. If I specify > 100 bytes for dat 1 _CDD fails because the format of dat 2 is wrong. > > How have you defined the template when trying to use a labelled duration? > > > > > > _______________________________________________ > This is the MI Programming on the AS400 / iSeries (MI400) mailing list > To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/mi400 > or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] > Before posting, please take a moment to review the archives > at http://archive.midrange.com/mi400. > _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.