Hello.
I have problem with convert data from String to Number. All data with comma don't convert to number.
It's nvarchar(40) in database.
My function:
shared numberVar sum_dur_op;
shared datetimeVar sum_date_op;
if not isNull({DM_UNDERWATER_DETAIL.cost_code}) and NumericText({DM_UNDERWATER_DETAIL.cost_code}) then (
sum_dur_op := sum_dur_op + ToNumber({DM_UNDERWATER_DETAIL.cost_code});
if not isNull({DM_UNDERWATER_OP.start_date}) or year({DM_UNDERWATER_OP.start_date}) <> 0 then
sum_date_op := DateAdd("h", sum_dur_op, {DM_UNDERWATER_OP.start_date});
);
I have got next results:
sum_dur_op sum_date_op
1.68 14.04.2015 0:00:00
1.92 14.04.2015 0:00:00
6 14.04.2015 6:00:00
9.6 14.04.2015 6:00:00
1.92 14.04.2015 6:00:00
I try function Val and have got the same results.