Thanks to all who provided tips on BigNum and Text values for larger integers.  
I may try the text option since some of our numbers have leading zeros in some 
reports and this may make the data more consistent between various reports.

The JDATE is an interesting idea to simplify naming files incorporating dates 
into the filename.

Thanks.

Bill


William Niehaus
Official Trial Manager
American Crystal Sugar Company
Technical Services Center
1700 11th Street North
Moorhead  MN  56560
Voice (218)236-4768
FAX (218)236-4744
>>> "Wills, Steve" <[email protected]> 07/10/09 3:38 PM >>>
Little correction:  "... intitial 7 characters ... '2009191' ...", but
CCYYMMDD also sorts correctly, as long as all leading zeroes are
preserved.

From: [email protected] [mailto:[email protected]] On Behalf Of Wills,
Steve
Sent: Friday, July 10, 2009 2:31pm 14:31
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Large integer values in Rbase v8

 

Don't know if this helps you at all, but it 's helped me.  It's an old
rule-of-thumb about whether or not a value IS or IS NOT an Integer.
Basically, it's like this, if you ain't gonna' add any of 'em together
(or subtract), then it's not an Integer.  For example, let's just add
together each of our SSN's.  Why?  That's the point - it makes no sense.

 

So, I'd second Paul's suggestion to take a look at JDATE as part of your
TEXT-type solution.

 

Although (JDATE(.#DATE)) does indeed return an INT value,
(CTXT(JDATE(.#DATE))) delivers TEXT values which can then be suffixed
with whatever you need, assuming that the 'YYYYDDD' component would be
of higher precedence when sorting and, therefore, the initial 6
characters in the TEXT value, such as '20090710MemphisTNWhatever'.  The
cool thing is that (CTXT(JDATE())) used in this way still sorts exactly
like INTEGER and DATE values.

 

Also, based on a quick little test at the R>, JDATE() returned CCYYDDD
even when DATE Format was MM/DD/YY, so the values would not "roll over"
after 10 years.

 

I use it all the time, even naming files or folders.

 

My 20090710_02_Cents_Worth,

Steve in Memphis

 

From: [email protected] [mailto:[email protected]] On Behalf Of Bill
Niehaus
Sent: Friday, July 10, 2009 10:58am 10:58
To: RBASE-L Mailing List
Subject: [RBASE-L] - Large integer values in Rbase v8

 

I am trying to track some large numbers and planned to use an integer
type.  The number can be 10 digits long but can not have any decimal
values (all whole numbers).  It seems like an integer works ok for an 9
digit number but does not work for a 10 digit number.  I'm not sure how
I can confirm this.

 

Should an integer handle a 10 digit number and if not, what is a better
option for a 9 digit number.

Thanks.

 

Bill


Reply via email to