This topic is locked

why is currency related to date type

8/9/2007 12:06:40 PM
PHPRunner General questions
Allenh author

Using 4.0
Currency: instead of "$" - I get "R" in front of numbers for currency.

I've tried VARCHAR and INT for the field, and I get the same.
In other fields, my date format is set as South African - YYYY, MM, DD
When I change my date fields to English - then the "$" appears correctly.
So, the question is, how do I get date format to be "YYYY, MM, DD" and currency "$"
And, is this something that will be 'adjusted/improved' in 4.1?
Thanks.

Allen.

J
Jane 8/9/2007

Allen,
currency and date format is dependent on your regional settings.

If you change date format you change your regional settings.
As workaround you can use Custom option on the "View as" settings dialog for your currency field.

Here is a sample code:

$value = "$".$value;

Allenh author 8/9/2007

Adding the code generates an error,
Parse error: syntax error, unexpected T_VARIABLE in /home/bcs/public_html/sitemanager/include/commonfunctions.php on line 407

Sergey Kornilov admin 8/9/2007

What is the line 407 in commonfunctions.php file?