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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bad Date Format String?

Status
Not open for further replies.

ShowersDK

Programmer
Mar 25, 2002
12
US
Can someone tell me whats wrong with this formula? It works in Crystal but
when I open the report through IE I get the Bad date format string error.

dateadd("m", 4, DateValue({?PeriodView} + "/01/" + Cstr(Year(CurrentDate))))

(where periodview is to char string of two numbers ranging from 01 to 12)

Thanks,
Darren
 
Does it run from CR installed on the server? It may be that the DateValue() function is from a DLL that isn't available. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I've tried DateValue, CDate, and DTStoDate and they all fail. Any suggestions?

Thanks,
Darren
 
I think Ken was asking if this report works when you do not access the report through a browser. Did you test that first? Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
The report works fine in Crystal Reports. I saved and refreshed the report a number of times.

Thanks,
Darren
 
Is CR installed on your server?
I am not sure which part of the formula it is rejecting.
What if you use this formula as a test?

dateadd("m", 4, Date (2002,5,28)) Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
That seems to have done the trick. Thanks!!!!
 
ShowersDK - I am curious as to what did the trick. My last formula was just a test, with a hard coded date, to help find the problem. What formula did you end up using? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top