473,563 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with Euro formatting

The system I support exists to generate invoices to send to European
clients. Currency values in these reports must be represented as
Euros with European conventions (comma for decimal; dot for thousands
separator). Example: €123.456,78

We have been generating these by remoting in to a dedicated PC with
its Windows Regional setting set to German. For various reasons we
would much prefer not to have to do this.

I've been trying to devise a format string that will display a number
in the format shown above on a PC with Regional setting set to US.
I'm not having luck. Has anyone succeeded in doing this?

TIA,

Bruce
Access 2003, Win XP
Oct 16 '08 #1
7 6493
On Thu, 16 Oct 2008 14:46:26 -0700 (PDT), br********@comc ast.net
wrote:

It may be best to write your own ConvertToEuro function, using regular
string manipulation functions. RegEx gurus may have other options.

-Tom.
Microsoft Access MVP

>The system I support exists to generate invoices to send to European
clients. Currency values in these reports must be represented as
Euros with European conventions (comma for decimal; dot for thousands
separator). Example: €123.456,78

We have been generating these by remoting in to a dedicated PC with
its Windows Regional setting set to German. For various reasons we
would much prefer not to have to do this.

I've been trying to devise a format string that will display a number
in the format shown above on a PC with Regional setting set to US.
I'm not having luck. Has anyone succeeded in doing this?

TIA,

Bruce
Access 2003, Win XP
Oct 17 '08 #2
On Oct 16, 11:24*pm, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
On Thu, 16 Oct 2008 14:46:26 -0700 (PDT), brucedo...@comc ast.net
wrote:

It may be best to write your own ConvertToEuro function, using regular
string manipulation functions. RegEx gurus may have other options.

-Tom.
Microsoft Access MVP
The system I support exists to generate invoices to send to European
clients. *Currency values in these reports must be represented as
Euros with European conventions (comma for decimal; dot for thousands
separator). Example: €123.456,78
We have been generating these by remoting in to a dedicated PC with
its Windows Regional setting set to German. *For various reasons we
would much prefer not to have to do this.
I've been trying to devise a format string that will display a number
in the format shown above on a PC with Regional setting set to US.
I'm not having luck. Has anyone succeeded in doing this?
TIA,
Bruce
Access 2003, Win XP
Thanks for the suggestion. Do you mean building a string for display,
rather than using Format() to format the number?
Oct 17 '08 #3
On Fri, 17 Oct 2008 03:40:43 -0700 (PDT), br********@comc ast.net
wrote:

That's right. I read the details of the Format function, and it cannot
switch the thousand separator or the decimal point. Therefore the
suggestion to just write the darn thing yourself.

-Tom.
Microsoft Access MVP

>On Oct 16, 11:24*pm, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
>On Thu, 16 Oct 2008 14:46:26 -0700 (PDT), brucedo...@comc ast.net
wrote:

It may be best to write your own ConvertToEuro function, using regular
string manipulation functions. RegEx gurus may have other options.

-Tom.
Microsoft Access MVP
>The system I support exists to generate invoices to send to European
clients. *Currency values in these reports must be represented as
Euros with European conventions (comma for decimal; dot for thousands
separator). Example: €123.456,78
>We have been generating these by remoting in to a dedicated PC with
its Windows Regional setting set to German. *For various reasons we
would much prefer not to have to do this.
>I've been trying to devise a format string that will display a number
in the format shown above on a PC with Regional setting set to US.
I'm not having luck. Has anyone succeeded in doing this?
>TIA,
>Bruce
Access 2003, Win XP

Thanks for the suggestion. Do you mean building a string for display,
rather than using Format() to format the number?
Oct 17 '08 #4
On Oct 17, 9:23*am, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
On Fri, 17 Oct 2008 03:40:43 -0700 (PDT), brucedo...@comc ast.net
wrote:

That's right. I read the details of the Format function, and it cannot
switch the thousand separator or the decimal point. Therefore the
suggestion to just write the darn thing yourself.

-Tom.
Microsoft Access MVP
On Oct 16, 11:24*pm, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
On Thu, 16 Oct 2008 14:46:26 -0700 (PDT), brucedo...@comc ast.net
wrote:
It may be best to write your own ConvertToEuro function, using regular
string manipulation functions. RegEx gurus may have other options.
-Tom.
Microsoft Access MVP
The system I support exists to generate invoices to send to European
clients. *Currency values in these reports must be represented as
Euros with European conventions (comma for decimal; dot for thousands
separator). Example: €123.456,78
We have been generating these by remoting in to a dedicated PC with
its Windows Regional setting set to German. *For various reasons we
would much prefer not to have to do this.
I've been trying to devise a format string that will display a number
in the format shown above on a PC with Regional setting set to US.
I'm not having luck. Has anyone succeeded in doing this?
TIA,
Bruce
Access 2003, Win XP
Thanks for the suggestion. *Do you mean building a string for display,
rather than using Format() to format the number?- Hide quoted text -

- Show quoted text -
Well, it's better to know. Thanks.
Oct 17 '08 #5
Sky
<br********@com cast.netwrote in message
news:0d******** *************** ***********@y79 g2000hsa.google groups.com...
The system I support exists to generate invoices to send to European
clients. Currency values in these reports must be represented as
Euros with European conventions (comma for decimal; dot for thousands
separator). Example: €123.456,78
How about something like this:

"€" &
Replace(Replace (Replace(Format (123456.78,"#,# ##.00"),".","_" ),",","."),"_", ",")

which displays as €123.456,78

- Steve
Oct 17 '08 #6
Sky
"Sky" <s.young @ stanley associates . comwrote in message
news:4B******** ********@nwrddc 01.gnilink.net. ..
<br********@com cast.netwrote in message
news:0d******** *************** ***********@y79 g2000hsa.google groups.com...
>The system I support exists to generate invoices to send to European
clients. Currency values in these reports must be represented as
Euros with European conventions (comma for decimal; dot for thousands
separator). Example: ?123.456,78

How about something like this:

"?" &
Replace(Replace (Replace(Format (123456.78,"#,# ##.00"),".","_" ),",","."),"_", ",")

which displays as ?123.456,78

- Steve
Oops, the Euro symbol got converted to a question mark, but you get the
idea.

- Steve
Oct 17 '08 #7
Try

Public Function CashToEuro(Amou nt As Currency) As String

Dim TxtAmount As String
Dim i As Integer, j As Integer
Dim OverThousand As Boolean

TxtAmount = CStr(Amount)
i = InStr(TxtAmount , ".")
If i 0 Then ' Decimal found
TxtAmount = Left(TxtAmount, i - 1) & "," & Right(TxtAmount ,
Len(TxtAmount) - i)
If Len(TxtAmount) 6 Then ' Over 1000
OverThousand = True
End If
End If

If i = 0 Then ' No Decimal
TxtAmount = TxtAmount & ",00"
If Len(TxtAmount) 3 Then ' Over 1000
OverThousand = True
End If
End If

If OverThousand = True Then
i = InStrRev(TxtAmo unt, ",") ' Find the decimal point
i = i - 4
TxtAmount = Left(TxtAmount, i) & "." & Right(TxtAmount ,
Len(TxtAmount) - i)
End If

CashToEuro = Chr(128) & TxtAmount

End Function
You will probably need to right align the output field

Phil
"Sky" <s.young @ stanley associates . comwrote in message
news:TC******** *********@nwrdd c01.gnilink.net ...
"Sky" <s.young @ stanley associates . comwrote in message
news:4B******** ********@nwrddc 01.gnilink.net. ..
><br********@co mcast.netwrote in message
news:0d******* *************** ************@y7 9g2000hsa.googl egroups.com...
>>The system I support exists to generate invoices to send to European
clients. Currency values in these reports must be represented as
Euros with European conventions (comma for decimal; dot for thousands
separator). Example: ?123.456,78

How about something like this:

"?" &
Replace(Replac e(Replace(Forma t(123456.78,"#, ###.00"),".","_ "),",","."),"_" ,",")

which displays as ?123.456,78

- Steve

Oops, the Euro symbol got converted to a question mark, but you get the
idea.

- Steve


Oct 20 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2237
by: christine | last post by:
Hello, I wanted to create a currency translator with PHP. The code looks like this: <?php $faktor=2.95583; // a double $dm = $euro * $faktor; // $euro is a double variable with the original value
1
4059
by: AngTalunin | last post by:
Hey, I've got a problem with utf-8 strings. I start with getting a string from a database and when i encode it with utf8Encode($str) and output it to the browser (which has a utf-8 encodig), there is no problem displaying special symbols (like the euro sign €).
2
5669
by: SPG | last post by:
Hi, I am haveing some problems with getting the correct XML response from a Servlet. I have data that contains the euro sign ( 0x80 = ?) and the string I am trying to print out to the response definitely has the correct formatting.. Here is some sample code: import java.io.*; import javax.servlet.*;
1
2553
by: Damjan | last post by:
Hi All, I have just spent 2 days tring to display euro sign in html which is obtained from xml and xsl. After you would not beleive what kind of research it came down to that when I load the page it shows it as € (the sqare thing) and when I reload it it as € (euro sign).
18
6498
by: gabriel | last post by:
greetings, I am currently working on a website where I need to print the Euro symbol and some "oe" like in "oeuvre". If I choose this : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > <html
0
1305
by: ashish | last post by:
hi All, Iam having a webapplication which when run under French culture info displays value of euro currency in this format 0.00 E, (E being the euro symbol, dont know how to type it here ) the issue is that currency in euro is displayed as E 0.00 instead of 0.00 E, Iam using following code ..
8
3668
by: Max | last post by:
My client has decided to use the Euro for the entire web site. Is there an easy way to get my ASP.NET app to format currency to Euro instead of US-dollar? Right now it's just reading the server settings, but I'd rather set this say at start up in the global.asax since other web sites running on the server may not share this setting. -Max
7
3307
by: kingski | last post by:
Any idea about this ? http://www.developerfusion.co.uk/forums/thread/114379/#114379 "Can any one help me as i am building a shopping cart and it supports multiple currencies but while sending confirmation mail o customer it does not show euro sign before amount he paid but it is showing a queston mark over there. It is working fine with...
3
3237
by: Georg Weiler | last post by:
Hi, I have a database PostgreSQL entry that includes the string € which is the euro sign. When I retrieve the string through a PHP SQL statement and then echo the result to the browser, it shows the correct euro sign, but in the source code, it still says € ... This is a problem to me, because I generate a PDF, and in this it still
0
7665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.