cancel
Showing results for 
Search instead for 
Did you mean: 

BAD Time Format String Error

Former Member
0 Kudos

I am getting a bad time format string error. I run the check and it gives me no errors found. When I refresh the report is when I recieve the bad time format string error. I have a feeling it is a null value I just do not know how to write the if statement. Please help. Here is the actual code:

Minute(CTime ("00:" + {EVAL_COMMENTS_Duration.COMMENTS}))* 60 + Second (CTime ("00:" + ({EVAL_COMMENTS_Duration.COMMENTS})))

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

To cater for nulls try

If isnull|( {EVAL_COMMENTS_Duration.COMMENTS}) or {EVAL_COMMENTS_Duration.COMMENTS} = '' then 0 else

Minute(CTime ("00:" + {EVAL_COMMENTS_Duration.COMMENTS}))* 60 + Second (CTime ("00:" + ({EVAL_COMMENTS_Duration.COMMENTS})))

Ian

Answers (1)

Answers (1)

Former Member
0 Kudos

you can check for nulls:

IF isnull({EVAL_COMMENTS_Duration.COMMENTS}) or TRIM({EVAL_COMMENTS_Duration.COMMENTS})="" then

TIme(0,0,0)

else

Minute(CTime ("00:" + {EVAL_COMMENTS_Duration.COMMENTS}))* 60 + Second (CTime ("00:" + ({EVAL_COMMENTS_Duration.COMMENTS})))