Link to home
Start Free TrialLog in
Avatar of rustypoot
rustypootFlag for United States of America

asked on

Crystal Reports - Date Formula Error

I have a formaula in the report - CDateTime({hsp_eMARDowntime_DailyTasks;1.VacInfoDate})

When I run this report locally on my Pc, it runs without any errors! When I post the rpeort to BOE, it errors out - 'Error in formula <VacInfoDate>. 'CDateTime({hsp_eMARDowntime_DailyTasks;1.VacInfoDate})' Bad date-time format string. Details: errorKind'

How can I fix this error? I need this ASAp. Thanks
Avatar of Mike McCracken
Mike McCracken

What are the values in the field?

WHat are the settings on your machine and the BOE machine for default dates?
GO to Control Panel --> REGIONAL SETTINGS
One is probably dd/mm/yyyy and the other is mm/dd/yyyy

Can the value be NULL?

If so you need to check for that first

If Not IsNull({hsp_eMARDowntime_DailyTasks;1.VacInfoDate}) then

Avatar of rustypoot


I checked the REgional SEttings on my PC and the server and they match.

The value is NULL most of the time.
Try using the foemula with the test in it.

I tried using the formula you gave but same error!
Are you running against the same database?  Same data?

Yes i am running against the same database and same data! It runs on my Pc but not on the portal!
Avatar of James0628

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thx James
You're welcome.  But, just out of curiosity, did you figure out what values were causing the error, and why you were getting the error on BOE, but not the local PC?  My post wasn't really a solution.  Just something to help diagnose the problem.  Technically, using IsDateTime might allow you to avoid the errors, but it doesn't address the real problem/question (why you're getting errors on BOE, but not on your local PC).