Reformatting of Value

Support/help with CloverETL (4.9) and CloverDX (5.0 or newer) implementation problems

av686165
Posts: 9
Joined: Fri Feb 14, 2020 5:53 am

Reformatting of Value

Postby av686165 » Sat Apr 04, 2020 8:02 pm

Could you please let me know how to formatting for below types of records,
2.44266E+21

When I am using Format cell functionality in MS excel , the below value has been transformed into 2442660018000190000000.

I want to achieve the same in CloverDX. Please assist.

vitd
Posts: 4
Joined: Wed Apr 08, 2020 9:26 am

Re: Reformatting of Value

Postby vitd » Wed Apr 08, 2020 9:47 am

Hello,

then double precision values are stored in number type variables in CTL2. This can be easily formatted by:

Code: Select all

number value = 2.44266E+21;
string formatted = num2str(value, "#") ;
printLog(info, formatted) ;


Please note that the resulting value might differ between Excel and CloverDX because of the different rounding. In order to save the precise values, the decimal data type is rather recommended.