Let's say that you have 2759 metres. You use the integer division and modulo operator to get the number of whole kilometres and remaining metres from that value:
vb.net Code:
  1. Dim Const METRES_PER_KILOMETRE As Integer = 1000
  2. Dim totalMetres As Integer = 2759
  3. Dim wholeKilometres As Integer = totalMetres \ METRES_PER_KILOMETRE
  4. Dim remainingMetres As Integer = totalMetres Mod METRES_PER_KILOMETRE
  5.  
  6. MessageBox.Show(String.Format("{0} metres is {1} kilometres and {2} metres.", totalMetres, wholeKilometres, remainingMetres))