Changing "DIMDY" to "D-MDY" will do what you want in universe regardless of any system settings.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Bill Haskett Sent: February 10, 2010 02:05 PM To: U2 Mail List Subject: Re: [U2] UniData ICONV function > The problem I'm having is people with different XP date settings (U.S. > & International) access one of the programs in our application. This > program prints an "amortization" schedule. Our code parses the day, > month, and year via... > DUEMO = OCONV(BEGDATE , 'DM') > DUEDAY = OCONV(BEGDATE , 'DD') > DUEYR = OCONV(BEGDATE , 'DY') > > ...then the information is converted to an internal PICK date via... > DUEDATE = ICONV(DUEMO:'-':DUEDAY:'-':DUEYR, 'DI') > > > Once this is done the date is printed along with the various loan > payment information. The month is incremented (and year when > necessary) then the process repeats. > > We notice when an international date configured XP machine accesses > our code via UniObjects (DesignBais), we think DATE.FORMAT is adjusted > and our code fails. Instead of getting Feb 1st, we get Jan 2nd. > Instead of getting Mar 1st we get Jan 3rd. etc. We noticed if we > implement this ICONV code all is well. > > DUEDATE = ICONV(DUEMO:'-':DUEDAY:'-':DUEYR, 'DIMDY') > > We were curious if this is standard and whether it works in UniVerse? > > Thanks, > > Bill > > ------------------------------------------------------------------------ > Ron Hutchings said the following on 2/10/2010 5:50 AM: >> It didn't work for me with your conversion code but when I changed it to 'D' it worked just fine. Internal conversions don't need all the fancy output codes. >> >> >>> Date: Tue, 9 Feb 2010 22:14:40 -0800 >>> From: [email protected] >>> To: [email protected] >>> Subject: Re: [U2] UniData ICONV function >>> >>> >>> Hi Bill, >>> >>> What version of UD are you running? >>> >>> We had serious problems with date conversion using ICONV in version 10.2.7 >>> of Universe. >>> >>> However this problem of yours looks like a DATE.FORMAT problem >>> Its looking at the month and thinks its a date and looking at the date and >>> thinks its a month. >>> >>> change your date format (ON / OFF) depending on which part of the world >>> you're in. >>> >>> jack >>> >>> Bill Haskett wrote: >>> >>>> The following works in UniData: >>>> >>>> DD = '01' >>>> DM = '02' >>>> DY = '2010 >>>> CRT ICONV(DM:'-':DD:'-':DY, 'DIMDY') >>>> >>>> ...returns '15343'. >>>> >>>> Does this work in UniVerse? >>>> >>>> Bill >>>> _______________________________________________ >>>> U2-Users mailing list >>>> [email protected] >>>> http://listserver.u2ug.org/mailman/listinfo/u2-users >>>> >>>> >>>> >>> -- >>> View this message in context: http://old.nabble.com/UniData-ICONV-function-tp27526458p27526610.html >>> Sent from the U2 - Users mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> U2-Users mailing list >>> [email protected] >>> http://listserver.u2ug.org/mailman/listinfo/u2-users >>> >> >> _________________________________________________________________ >> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. >> http://clk.atdmt.com/GBL/go/201469229/direct/01/ >> _______________________________________________ >> U2-Users mailing list >> [email protected] >> http://listserver.u2ug.org/mailman/listinfo/u2-users >> _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
