Delphi cannot know that when storing cents in DB you actually mean dollars. When you retrive data from your DB you need to devide retrieved values by 100, and when you store data to DB you multiply your dollar values by 100 to get cents. If you use SQL queries to retrive and store data then you can just add *100 and /100 to your queries.
Alex ----- Original Message ----- From: "Steven Knight" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Monday, January 27, 2003 10:02 AM Subject: [DUG]: Dollar amounts in int fields > Hi all, > Don't know if I'm being thick or if this is actually difficult. > > My database stores $ amounts in Int fields as cents. > I want to edit and display them to the user as a 999.99 format. > What facilities should I use in Delphi to achieve this? > > Steven Knight > Analyst / Programmer > Environment Canterbury > P.O. Box 345, Christchurch > phone: (03) 365-3828 > email: [EMAIL PROTECTED] > > > Hey kids! (and parents) - have fun in the trash zone learning to reduce waste http://www.ecan.govt.nz/Waste/waste-wastenotwantnot.html > > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > > The contents of this email and any attachments are not formal > policy of Environment Canterbury, unless otherwise stated. > ********************************************************************** > > --------------------------------------------------------------------------- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
