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

Formula works one day and not the next, Any Help ?

Status
Not open for further replies.

rico7937

IS-IT--Management
Feb 20, 2001
33
US
I have a formula for a change report that I run once a week. The report ran fine Thursday and now today I get this error:

Here is the formula :

If IsNull({CHANGE.PLAN_ST_TIME}) Then
' '
Else (
TimeVar Plan_St_Time := Time(ToNumber(Left({CHANGE.PLAN_ST_TIME},2)),ToNumber(Mid({CHANGE.PLAN_ST_TIME},4,2)),ToNumber(Right({CHANGE.PLAN_ST_TIME},2)));
tzcvtConvToLocalDatetimeByName (ToText(DateTime({CHANGE.PLAN_ST_DATE},Plan_St_Time),"MM/dd/yyyy hh:mm tt"),"Eastern Standard Time"))


I get the following error on the first part of the formula:

The string is non-numeric

TimeVar Plan_St_Time := Time(ToNumber(Left({CHANGE.PLAN_ST_TIME},2))


I have no clue on how to correct this. Any advice would be greatly appreciated !
 
Expand the first test,
Code:
If IsNull({CHANGE.PLAN_ST_TIME}) or {CHANGE.PLAN_ST_TIME} = " "

Your formula looks over-complex. If it still gives trouble, I'd suggest breaking it up into separate formuals and then stringing them together as text.

It helps also to give your Crystal version.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thank you so much ! That correction worked ! Sorry about the version which was 10.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top