API
Version 7.x > API > Import utility - Convert double to int View modes: 
User avatar
Member
Member
Yehuda - 1/12/2014 11:59:10 AM
   
Import utility - Convert double to int
Hi,

Hope this is the correct forum for this.
I got a new project, and we're moving an old site based on classic asp to Kentico.
The old site's db isn't made so well, and many times uses double for certain fields instead of integers.
I would like to use integers with Kentico.
I use the import utility to move the data from the old site to the new one, but in the case of converting the doubles (which are infact 50.00000, and have nothing after the decimal point), I either get an exception (Conversion failed when converting the nvarchar value '5.00000000' to data type int.), or if I use ={%ToInt(FileCount)%} as the source field expression I just get 0.
How do I handle this sort of conversion?

Thanks

User avatar
Member
Member
Yehuda - 1/12/2014 12:46:03 PM
   
RE:Import utility - Convert double to int
I replied on the wrong thread,
but I found a solution.
If I use ={%ToDouble(FileCount)%}, I get an integer.