取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
选择语言 隐藏翻译栏
FN
FN
Level VI

Evaluating an algebraic expression introduced as strings

I have a character column that has the duration of different processes in the following format:

 

3h 40min 15s

3h 47min 19s

5min 6s

29min

 

I changed this to another character column with find and replace:

3*3600 + 40*60 + 15

3*3600 + 47*60 + 19
5*60 + 6
29 * 60

How can I add a formula that evaluates each expression when the expression is a string?
This works:

Eval( Expr( 3*3600 + 40*60 + 15 ) )

But the formula doesn't as the expression is in characters:
Eval( Expr( "3*3600 + 40*60 + 15 "))




 

1 个已接受解答

已接受的解答
jthi
Super User

Re: Evaluating an algebraic expression introduced as strings

Eval(Parse()) is what you would want to use in case like this

Eval(Parse("3*3600 + 40*60 + 15 ")); // 13215
-Jarmo

在原帖中查看解决方案

1 条回复1
jthi
Super User

Re: Evaluating an algebraic expression introduced as strings

Eval(Parse()) is what you would want to use in case like this

Eval(Parse("3*3600 + 40*60 + 15 ")); // 13215
-Jarmo