[AccessD] Data Export Spec - Rev1

John Colby jwcolby at ColbyConsulting.com
Sat Oct 22 10:45:06 CDT 2005


Are you discussing a report generator or a data export facility?  Generally
data import programs don't want or need thousand separators, only data left
of the decimal point, the decimal point, and N places behind the decimal
point.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Gracie
Sent: Saturday, October 22, 2005 11:16 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Data Export Spec - Rev1


Really, 
 I would think that it would be necessary in a technical environment, such
as in mechanical engineering...????
 


Robert Gracie
www.servicexp.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby
Sent: Saturday, October 22, 2005 10:30 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Data Export Spec - Rev1

>I have never seen an export specification requiring a thousand
>separator -
on the contrary, it must not exist.

Correct.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Saturday, October 22, 2005 7:18 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Data Export Spec - Rev1


Hi John

You can build the string piece by piece but I mostly use Format():

  strValue = Format(curValue * 100, "0\,00")

This is hardcoded for comma as decimal separator and two decimals. As
Stuart points out, you would probably need something more generic:

  Const cstrFormatEscape As String = "\"
  lngDecimals = 2
  strDecimal = ","
  For lngChar = 1 to Len(strDecimal)
    strFormatDecimal = strFormatDecimal & cstrFormatEscape &
Mid(strDecimal, lngChar, 1)
  Next
  strFormat = "0" & strFormatDecimal & String(lngDecimals, "0")
  strValue = Format(curValue * 10 ^ lngDecimals, strFormat)

This will not give a thousand separator and Format() can not be used for
that here. On the other hand, I have never seen an export specification
requiring a thousand separator - on the contrary, it must not exist.

/gustav

>>> jwcolby at ColbyConsulting.com 21-10-2005 21:51:55 >>>
OK, so how do you handle this when you format a currency string?

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/ 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Friday, October 21, 2005 2:57 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Data Export Spec - Rev1


Hi John

No, we can use Format() just fine. 

It's just that you can't rely on it for formatting decimals when
exporting to a text file as the specs for this will require one specific
format (say dot for the decimal point which is quite often used for
mainframes) while
Format() will deliver whatever is set on the user's machine.

/gustav

>>> jwcolby at ColbyConsulting.com 21-10-2005 17:25 >>>
Gustav,

I am assuming that the format$() will work just fine assuming that you
are using this in Denmark, then the strings you use to format allow you
to use Danish formatting constructs?  Are you saying that you cannot use
Format$() because it doesn't work anywhere but the US?  If that is the
case, then people outside of the US will need to work with the team to
explain how you guys accomplish formatting.

John W. Colby
www.ColbyConsulting.com 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Friday, October 21, 2005 10:39 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Data Export Spec - Rev1


Hi John

You would need to address the good old internationalization task here as
well. Over here, this example will output $23.423,00 ...

/gustav


>>> jwcolby at ColbyConsulting.com 21-10-2005 15:56 >>>

For example, if a field needs to be currency, placing the format$
"$###,###.00" gives an output in the text string of $23,423.00, etc etc.


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list