Hi Anil,

Thanks for your reply but I can have users localized in French or English. I 
need to have code that works for all regional settings.


Cordialement,
__________________________

Jérôme Piquot

Gédimat Wolff-Catenne
6, rue de la Gare 
67120 Ernolsheim sur Bruche
France

Tél : +33 3 88 59 50 60
Fax: +33 1 41 30 17 34
Blog : http://piquot.spaces.live.com/
__________________________

Google Map pour Gédimat Wolff

-----Message d'origine-----
De : Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] De la 
part de Anil Ozay
Envoyé : lundi 7 janvier 2008 10:40
À : Axapta-Knowledge-Village@yahoogroups.com
Objet : RE: [Axapta-Knowledge-Village] str2num with comma as decimal separator

Hi Jerome,

 

You are right, but you can add this function to Global class.

 

static real str2NumFr (str strNumber)

{

 

    ;

    strNumber  = strreplace(strNumber, ',' , '.');

    return str2num(strNumber);

}

 

I'm from Turkey and we have this problem too, and we solved it with this
function.

 

Regards,

 

Anil Ozay

MVP Dyanmics AX

 

From: Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Jérôme Piquot
Sent: Saturday, January 05, 2008 10:19 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] str2num with comma as decimal separator

 

Hello,

it seems that str2num does not take regional settings for converting strings

to real.

{
str strNum = "125,45"; // france decimal separator is "," not "."
real num;

num = str2num(strNum);

// num will contain 125
}

how can i convert numbers with decimal sépartor that is not "." ?

-- 

Cordialement,

__________________________

Jérôme Piquot

Gédimat Wolff-Catenne

6, rue de la Gare 

67120 Ernolsheim sur Bruche

France

Tél : +33 3 88 59 50 60

Fax: +33 1 41 30 17 34

Blog : http://piquot.spaces.live.com/ <http://piquot.spaces.live.com/> 

__________________________

Google Map pour Gédimat Wolff <http://maps.google.fr/maps?f=q
<http://maps.google.fr/maps?f=q&hl=fr&geocode=&time=&date=&ttype=&q=gedimat+
wolff&sll=47.15984,2.988281&sspn=11.460679,20.43457&num=10&ie=UTF8&ll=48.567
52,7.646484&spn=0.174254,0.31929&z=12&iwloc=A&om=1>
&hl=fr&geocode=&time=&date=&ttype=&q=gedimat+wolff&sll=47.15984,2.988281&ssp
n=11.460679,20.43457&num=10&ie=UTF8&ll=48.56752,7.646484&spn=0.174254,0.3192
9&z=12&iwloc=A&om=1> 

[Non-text portions of this message have been removed]

 



[Non-text portions of this message have been removed]



Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.

Come and choose your preferred name for Microsoft Dynamics AX on the Axapta 
Knowledge Village, Visit www.axapta-knowledge-village.tk

 
Yahoo! Groups Links



Reply via email to