i have some fields in an oracle database... the datatype for the fields is
number and when i pull up the records they show up in the following format:
3128.87 which is what i want in my asp as well. However instead of getting
87 on to the right of the decimal point I get 0 zeros.
here is my code: <%=FormatCurrency(CDbl(rsDataSet("In_Academic"),2))%>
Not sure what the problem is.... Any clue?! thanks in advance!

RE: Conversion function problems by RedStar20

RedStar20
Tue Oct 25 13:55:04 CDT 2005

The code is the following: <%=FormatCurrency(rsDataSet("In_Academic"),2)%>
sorry for the mistake... so it seems as if it is rounding down, but not sure
why


"Red_Star20" wrote:

> i have some fields in an oracle database... the datatype for the fields is
> number and when i pull up the records they show up in the following format:
> 3128.87 which is what i want in my asp as well. However instead of getting
> 87 on to the right of the decimal point I get 0 zeros.
> here is my code: <%=FormatCurrency(CDbl(rsDataSet("In_Academic"),2))%>
> Not sure what the problem is.... Any clue?! thanks in advance!

RE: Conversion function problems by Conrad

Conrad
Tue Oct 25 15:40:07 CDT 2005

If you add the CDbl does that help? I would think it would. Also I've had
trouble using FormatCurrency if the field was null so you might want to check
for that first.


"Red_Star20" wrote:

> The code is the following: <%=FormatCurrency(rsDataSet("In_Academic"),2)%>
> sorry for the mistake... so it seems as if it is rounding down, but not sure
> why
>
>
> "Red_Star20" wrote:
>
> > i have some fields in an oracle database... the datatype for the fields is
> > number and when i pull up the records they show up in the following format:
> > 3128.87 which is what i want in my asp as well. However instead of getting
> > 87 on to the right of the decimal point I get 0 zeros.
> > here is my code: <%=FormatCurrency(CDbl(rsDataSet("In_Academic"),2))%>
> > Not sure what the problem is.... Any clue?! thanks in advance!

RE: Conversion function problems by RedStar20

RedStar20
Tue Oct 25 16:01:06 CDT 2005

So I should try it like this?!
<%=FormatCurrency(CDbl(rsDataSet("In_Academic"),2))%>
It is definitely not null, because i checked....


"Conrad" wrote:

> If you add the CDbl does that help? I would think it would. Also I've had
> trouble using FormatCurrency if the field was null so you might want to check
> for that first.
>
>
> "Red_Star20" wrote:
>
> > The code is the following: <%=FormatCurrency(rsDataSet("In_Academic"),2)%>
> > sorry for the mistake... so it seems as if it is rounding down, but not sure
> > why
> >
> >
> > "Red_Star20" wrote:
> >
> > > i have some fields in an oracle database... the datatype for the fields is
> > > number and when i pull up the records they show up in the following format:
> > > 3128.87 which is what i want in my asp as well. However instead of getting
> > > 87 on to the right of the decimal point I get 0 zeros.
> > > here is my code: <%=FormatCurrency(CDbl(rsDataSet("In_Academic"),2))%>
> > > Not sure what the problem is.... Any clue?! thanks in advance!

RE: Conversion function problems by Conrad

Conrad
Wed Oct 26 07:39:07 CDT 2005

I would also use the IsNumeric to make sure what you are passing is a number.
<% If IsNumeric(rsDataSet("In_Academic")) Then
FormatCurrency(CDbl(rsDataSet("In_Academic"),2))
End If %>

"Red_Star20" wrote:

> So I should try it like this?!
> <%=FormatCurrency(CDbl(rsDataSet("In_Academic"),2))%>
> It is definitely not null, because i checked....
>
>
> "Conrad" wrote:
>
> > If you add the CDbl does that help? I would think it would. Also I've had
> > trouble using FormatCurrency if the field was null so you might want to check
> > for that first.
> >
> >
> > "Red_Star20" wrote:
> >
> > > The code is the following: <%=FormatCurrency(rsDataSet("In_Academic"),2)%>
> > > sorry for the mistake... so it seems as if it is rounding down, but not sure
> > > why
> > >
> > >
> > > "Red_Star20" wrote:
> > >
> > > > i have some fields in an oracle database... the datatype for the fields is
> > > > number and when i pull up the records they show up in the following format:
> > > > 3128.87 which is what i want in my asp as well. However instead of getting
> > > > 87 on to the right of the decimal point I get 0 zeros.
> > > > here is my code: <%=FormatCurrency(CDbl(rsDataSet("In_Academic"),2))%>
> > > > Not sure what the problem is.... Any clue?! thanks in advance!