Split a float - need a code snippet

Hi,

I need the elapsed distance split in km and meters. E. g. 13.345 km shall be split in 13 and 345. Can you provide a short and effective code snippet which does this?

Thanks for your help.