Hi Tom,

You can convert a double value straight to a currency 
value but you might have rounding problems so you need 
to use the ROUND function.
set v vtest1 double = 45.7067
set v vtest2 currency = .vtest1
vtest2 should equal $45.70
set v vtest2 currency = (round(vtest1,2))
vtest2 should equal $45.71

You might want to look and see if  BRND function is 
better suited to your needs.

Best regards,
Mike Young

On Sun, 23 Jun 2002 09:50:19 -0700, Tom Grimshaw wrote:

>G'day,
>
>How do you set a CURRENCY data type column to a value
>in a DOUBLE data type column?
>
>There does not seem to be an in-built R:BASE function
>to do this.
>
>I have a column (formerly a CURRENCY data type and
>now a DOUBLE data type) from which I need to obtain
>the hourly charge rate for job costing.   The column
>HourlyRateCost IN PersonnelPayRates needs to be a
>DOUBLE data type as some clients require the ability
>to store part cents for employee charge rates.
>
>I would prefer not to have to change the data type of
>UnitDr from CURRENCY (since it is used _extensively_).
>
>This is the variable in the form:
>
>UnitDr = HourlyRateCost IN PersonnelPayRates WHERE PersNumb = 
.vPrsnnlNumb 
>AND EffectiveFromDate = .vEffectFromDate
>
>Warmest regards,
>
>
>Tom Grimshaw
>coy:    Just For You Software
>tel:    612 9552 3311
>fax:    612 9566 2164
>mobile: 0414 675 903
>
>post:   PO Box 470  Glebe  NSW  2037  Australia
>street: 3/66 Wentworth Park Rd  Glebe  NSW  2037
>
>email:  [EMAIL PROTECTED]
>web: www.just4usoftware.com.au
>
>"... the control of impulse -- is the first principle of civilization."-- 
>Will Durant,
>Pulitzer Prize winning philosopher, writer and historian
>
>the most needed product in the world can be found at
>www.thewaytohappiness.org
>
>This email and any files transmitted with it are confidential to the 
>intended recipient and may be privileged. If you have received this email 
>inadvertently or you are not the intended recipient, you may not 
>disseminate, distribute, copy or in any way rely on it. Further, you should 
>notify the sender immediately and delete the email from your computer. 
>Whilst we have taken precautions to alert us to the presence of computer 
>viruses, we cannot guarantee that this email and any files transmitted with 
>it are free from such viruses.
>
>================================================
>TO SEE MESSAGE POSTING GUIDELINES:
>Send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: INTRO rbase-l
>================================================
>TO UNSUBSCRIBE: send a plain text email to 
[EMAIL PROTECTED]
>In the message body, put just two words: UNSUBSCRIBE rbase-l
>================================================
>TO SEARCH ARCHIVES:
>http://www.mail-archive.com/rbase-l%40sonetmail.com/



================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to