If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > comma separator

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-31-11, 18:19
jacey100 jacey100 is offline
Registered User
 
Join Date: Nov 2010
Posts: 8
comma separator

I enter currency or number data into a cell with comma separator, like this 5,250 or £5,250. The separator shows up correctly in the access table.

When I pull this out from a .asp recordset the comma is not there, just get 5250

When I test the SQL statement in dreamweaver the comma is also not shown.

How do I get the comma separator to display ?

It works ok if I enter as text or memo, but I want to sort on price ascending which means entering as a number or currency.

Thanks in advance

Last edited by jacey100; 03-31-11 at 18:49.
Reply With Quote
  #2 (permalink)  
Old 04-04-11, 00:33
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
You would need to reformat it to get your comma's and, if desired, you currency signs back.

Actually, if you are using Access you could probably use a formatting mask (I think they exist but I haven't used access for about 12 years). This might work for you, but personally I would format it on the client.
Reply With Quote
  #3 (permalink)  
Old 04-04-11, 04:01
jacey100 jacey100 is offline
Registered User
 
Join Date: Nov 2010
Posts: 8
Thanks,

I reformatted using

Response.Write(FormatCurrency((Rs.Fields.Item("xxx x").Value),0))

works fine

Last edited by jacey100; 04-04-11 at 04:04. Reason: typo
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On