Forums
This topic is locked
Formatting to 2 decimal places data from SQL
Posted 30 Oct 2001 18:13:07
1
has voted
30 Oct 2001 18:13:07 Gary Haddon posted:
Hi, I can some please help me, I am accessing a SQL database and on my web page I have a column of numeric figures that are a monetary amount. How can I get the values for the amounts that are returned from the database to show 2 decimal places.For example, 10.55 instead of 10 or sometimes 10.2 depending upon what data is in the database.
Thanks for your help.
Gary
Replies
Replied 30 Oct 2001 19:12:42
30 Oct 2001 19:12:42 Owen Eastwick replied:
First make sure the Data Type for the Field is set to Currency in the Database itself.
You can then format the number on the page too. In the Server Behaviours palette double click on the Dynamic Text field that is your Currency value, now select Currency - 2 Decinal Places from the List Menu. The field will be displayed as a currency value according to the Regional Settings of the host server. ie. $25.00, £25.00 etc.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
You can then format the number on the page too. In the Server Behaviours palette double click on the Dynamic Text field that is your Currency value, now select Currency - 2 Decinal Places from the List Menu. The field will be displayed as a currency value according to the Regional Settings of the host server. ie. $25.00, £25.00 etc.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo