Jun 5, 2006 #1 angjbsca Programmer Joined May 26, 2006 Messages 30 Location PR Hi How I can format a field with this value '6' to '06' in as400 db2... in .net would look like this format(field,'0#')
Hi How I can format a field with this value '6' to '06' in as400 db2... in .net would look like this format(field,'0#')
Jun 6, 2006 1 #2 BrianTyler IS-IT--Management Joined Jan 29, 2003 Messages 232 Location GB I don't know about AS400 specifics, but you could try: digits(dec(FIELD,2)) You will have to investigate overflow possibilities etc Upvote 0 Downvote
I don't know about AS400 specifics, but you could try: digits(dec(FIELD,2)) You will have to investigate overflow possibilities etc
Jun 6, 2006 Thread starter #3 angjbsca Programmer Joined May 26, 2006 Messages 30 Location PR Thanks a lot its work great.... Upvote 0 Downvote
Jun 7, 2006 #4 ddiamond Programmer Joined Apr 22, 2005 Messages 918 Location US Brian, I always did this with the following trick: substr(field+100,2) I like your approach much better. I've just always feared the digits function. - Dan Upvote 0 Downvote
Brian, I always did this with the following trick: substr(field+100,2) I like your approach much better. I've just always feared the digits function. - Dan