Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
formatnumber ASP ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
SalEX



Joined: 22 Sep 2003
Posts: 78
Location: home

PostPosted: 22.08.2007 10:59    Post subject: formatnumber ASP ? Add user to your forum ignore list Reply with quote

imam pitanje.
imam problem sa izražavanjem cijene kod nekih nekretnina ( pozicija točke i zareza ).
Prikazuje mi se ovako: 99,000.00 a trebalo bi 99.000,00

ja sam to ovako postavio:
<%= formatnumber(ra("cijena"),2,-1) %>

vidio sam negdje da to ovisi o postavkama servera, ali bez obzira na to, trebao bi to nekako riješiti..
some ideas???
hvala
Back to top
View user's profile Send private message
357ica



Joined: 26 Apr 2005
Posts: 75
Location: Zagreb

PostPosted: 22.08.2007 12:40    Post subject: Add user to your forum ignore list Reply with quote

Taj način prikaza je vezan za regional settings kompa, ilti servera, kaj već. Probao sam doma lokalno, formatNumber(someNumber,2) i prikazuje currency normalno kako treba, tj prema našem (cro) načinu prikazivanja. Druga opcija, možda ona primitivna da napraviš funkciju kojom ćeš izmjenjati "," i "."..

primjer:

prihvatiš broj u string:
intNumber="99,000"

myNumber=Replace(intNumber,",",";")
myNumber=Replace(myNumber,".",",")
myNumber=Replace(myNumber,";",".")

Response.write( myNumber & "<br>")

Valjda sam uspjeo pomoći, a pretpostavljam da sve to vučeš i baze, probaj tamo namjestit fieldType na currency....

Pogledaj još http://www.w3schools.com/vbscript/func_formatnumber.asp
Back to top
View user's profile Send private message
zvone



Joined: 09 Sep 2003
Posts: 160
Location: Zg

PostPosted: 22.08.2007 17:59    Post subject: Add user to your forum ignore list Reply with quote

Stavi na vrh stranice ovo

Session.LCID = 1050

_________________
Odin's descendant
Back to top
View user's profile Send private message
357ica



Joined: 26 Apr 2005
Posts: 75
Location: Zagreb

PostPosted: 22.08.2007 18:32    Post subject: Add user to your forum ignore list Reply with quote

zvone wrote:
Stavi na vrh stranice ovo

Session.LCID = 1050


Ova linija kôda je još bolja, nisam se toga sjetio.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group