The issue is that the Formula element does not parse the formula presented and then place the resulting code into the formula. Therefore, what is presented to the formula element, needs to be exactly the JSL the formula needs to be. Below is a rework of your jsl
Names Default To Here( 1 );
dt = Current Data Table();
ColNames = dt << get column names( string, Numeric, character, continuous, Nominal );
//N Items( ColNames );
For( i = 1, i <= N Items( ColNames ), i++,
If(
Ends With( ColNames[i], "(secs)" ),
New Column( Concat( ColNames[i], "_to_", "Hr" ),
Formula( Eval( Parse( ":\!"" || ColNames[i] || "\!"n / 3600" ) ) )
),
Ends With( ColNames[i], "(min)" ),
New Column( Concat( ColNames[i], "_to_", "Hr" ),
Formula( Eval( Parse( ":\!"" || ColNames[i] || "\!"n / 60" ) ) )
),
)
);
Jim