Currency format : how to do it

Hi John

Does this work for you?

*** test cases ***

currency test
	${number} = 		Set Variable	160000
	${currstring} = 	Evaluate		"{:,.0f} €".format(${number}).replace(',', ' ')
	Should Be Equal As Strings		${currstring}		160 000 €

The builtin Evaluate is pretty useful :+1:t3:

Dave.

1 Like