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!