Irina: I don't think the B in 'DB' has any effect on internal conversion in Universe. I don't know about UniData - which are you using?
We have Universe 10.2. I ran this little program to compare the result after an ICONV using the 'D' and 'DB' conversions: 0001: FOR I = 1000 TO 14731 0002: ODAT = OCONV(I,'D2/') 0003: INTERNAL.D = ICONV(ODAT,'D') 0004: INTERNAL.DB = ICONV(ODAT,'DB') 0005: IF INTERNAL.D # INTERNAL.DB THEN PRINT ODAT,INTERNAL.D,INTERNAL.DB 0006: NEXT I 0007: END If there had been differences after conversion, like your mentioned "last day of February", then line 5 in the program would cause a line to display. However when I ran the program, no lines were displayed. That is, every conversion was identical on each date from 09/26/1970 thru 04/30/2008. It appears the first character D tells the compiler to perform a date conversion and the second character is disregarded. Indeed, I changed the 'DB' conversion code to 'DZ', then 'DK', then 'D+' and they all ran the same, no conversion differences were displayed. For OCONV, the output is quite different. For internal date 10000, a 'D' conversion yields "18 MAY 1995", a 'DB' conversion yields "05B18B1995" (so the B character is simply used as the separator), and a 'DBW' conversion yields "4" - the day of the week (Thursday). If the first character is illegitimate, the compiler does not catch it, but the conversion fails. I set the conversion to 'ZZ', the compiler did not care, but on every date there was no conversion of the input date. Harold Oaks Clark County -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Irina Lissok Sent: Wednesday, May 07, 2008 1:16 PM To: [email protected] Subject: RE: [?? Probable Spam] RE: [U2]ICONV(VAR,"DB") David, It is possibly valid because it passed the compilation. If it will not pass the compilation we would know it is not valid and just do not consider this conversion. The point is that is probably legitimate conversion because it still works for other date conversion except the last day of February. Irina Lissok -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Murray Sent: Wednesday, May 07, 2008 3:24 PM To: [email protected] Subject: [?? Probable Spam] RE: [U2]ICONV(VAR,"DB") Irina, I do not think that a ICONV conversion code of 'DB' is actually valid. 'DMB', DWB' etc for short codes for month and day respectively are OK. Cheers, David Murray * Learn and do * Excel and share http://u2blog.org -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Irina Lissok Sent: Wednesday, May 07, 2008 2:21 PM To: [email protected] Subject: re:[U2]ICONV(VAR,"DB") Hey all, We are using ICONV(VAR,'DB') and it works perfectly except one case when the date is the last day of February any year. For instance for VAR=31-MAR-2007 INTERNAL.VAR=ICONV(VAR,'DB') INTERNAL.VAR=14335 For VAR=28-FEB-2007 INTERNAL.VAR=ICONV(VAR,'DB') INTERNAL.VAR='' In case VAR=29-FEB-2008 INTERNAL.VAR=ICONV(VAR,'DB') INTERNAL.VAR='' We tested it with STATUS() and in both cases it returns 0 which is considered as successful conversion. If we are using ICONV(VAR,'D') there is no problem in conversion to internal representation. Is anybody familiar with 'DB' conversion and what the difference between 'DB' and 'D' except the one we've already known it doesn't convert the last day of February? Irina Lissok. ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
