Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Thousands in Integer?

0 views
Skip to first unread message

Michael Kintner

unread,
Oct 28, 2003, 1:39:50 PM10/28/03
to
I know how to add thousands mark in decimals usinf format but how can you do
it in Integer?

The format command only does decimals.

Thanks,
Mike


Michael Kintner

unread,
Oct 28, 2003, 1:47:43 PM10/28/03
to
Opps, real bad grammer

I would like to see the commas in a Interger value not just the decimals
value. Any ideas?

Thanks in advance.
Mike

"Michael Kintner" <mkin...@adelphia.net> wrote in message
news:WJynb.133000$qj6.9...@news1.news.adelphia.net...

Maarten Wiltink

unread,
Oct 28, 2003, 1:49:57 PM10/28/03
to
"Michael Kintner" <mkin...@adelphia.net> wrote in message
news:WJynb.133000$qj6.9...@news1.news.adelphia.net...

> I know how to add thousands mark in decimals usinf format but how can


> you do it in Integer?
>
> The format command only does decimals.

Use decimals with zero decimals? I think it can be done simpler, too.
Type "Format", press F1, read help. There's a whole page on format
strings.

Groetjes,
Maarten Wiltink


Rob Kennedy

unread,
Oct 28, 2003, 1:51:18 PM10/28/03
to
Michael Kintner wrote:
> I know how to add thousands mark in decimals usinf format but how can
> you do it in Integer?

Here's one way:

Format('%.0n', [IntVal * 1.0]);

Multiplying by 1.0 ensures that an Extended is passed to Format instead
of an Integer.

--
Rob

Michael Kintner

unread,
Oct 28, 2003, 1:55:30 PM10/28/03
to
I have a long value called TotalBytes and wish to display it with commas
using the format command.


"Maarten Wiltink" <maa...@kittensandcats.net> wrote in message
news:3f9eba55$0$58708$e4fe...@news.xs4all.nl...

Michael Kintner

unread,
Oct 28, 2003, 1:56:42 PM10/28/03
to
I have a long value called TotalBytes and wish to display it with commas
using the format command.


"Rob Kennedy" <.> wrote in message news:vptejsm...@corp.supernews.com...

Rob Kennedy

unread,
Oct 28, 2003, 2:36:33 PM10/28/03
to
Michael Kintner wrote:
> I have a long value called TotalBytes and wish to display it with commas
> using the format command.

Yes, I know. Did you actually try the code I gave you?

Alternatively, you can display a byte count the same way Explorer shows
file sizes by using the StrFormatByteSize API function. See MSDN for
details.

--
Rob

Terry Russell

unread,
Oct 28, 2003, 7:33:48 PM10/28/03
to
"Rob Kennedy" <.> wrote in message news:vpth8ob...@corp.supernews.com...

> Michael Kintner wrote:
> > I have a long value called TotalBytes and wish to display it with commas
> > using the format command.
>
> Yes, I know. Did you actually try the code I gave you?

wrong format beyond 999,999,999 GB, fails some time around 2026 ;-)

0 new messages