Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FormatDate() function error - #ERROR

Status
Not open for further replies.

binboy77

MIS
Oct 20, 2002
43
0
0
IN
hi,
i am using the BO ver 6, formatdate() function to convert a date to a string. i am passing a dimension which has date value as the first parameter and "mm/dd/yyyy" as the second.
the dataprovider is VBA and the database is DB2.

Code:
 FormatDate(<datedimension>,"mm/dd/yyyy")

however, this is giving me the #ERROR.

when i use a datefield from a universe, the above formula works fine, but with a datefield provided by the SQL in the VBA dataprovider, it gives me the above #ERROR error.

any suggestion on how to rectify this error at BO level.
ofcourse, the workaround would be to get the conversion done at database level, but if i can get this done at BO level, then it would be great.

thanks much


Bin
 
This tells me that your VBA dataprovider is not returning a date. Try another function. I bet your data is being returned as a string.

Steve Krandel
VERITAS Software
 
Hi Steve,
In my VBA sql, this field is being fetched as it is from the database where it is a date field. Also i tried to do some string function on it like the substr() function to check if its being returned as a string, but that dosen't work. Even i tried checking if its a date by using the ISDATE() function in BO which returns me a true value. So i am convinced that this field is being returned to VBA dataprovider as a date field.
But the formatdate() function dosen't work.
Is there any other way i can check this or make it work?

Thanks much

Bin
 
I give. It works fine for me in 6.5.1.

Steve Krandel
VERITAS Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top