Hi - I imported the attached csv file (publicly available from 1270.0.55.001 - Australian Statistical Geography Standard (ASGS): Volume 1 - Main Structure and Greater Capital City Statistical Areas, July 2016 (abs.gov.au) using the following code

Code:
import delimited "CED_2016_AUST.csv", clear
I then generated another variable from the first numeric variable


Code:
gen sa2= floor(sa1_maincode_2016/100)

format sa1 sa2 %14.0f

list sa1 sa2 in 1/5

This gave the following strange results

Code:
     +-------------------------+
     | sa1_ma~2016         sa2 |
     |-------------------------|
  1. | 11901135961   119011360 |
  2. | 11904137903   119041376 |
  3. | 11903137228   119031376 |
  4. | 11901136026   119011360 |
  5. | 11903136932   119031368 |
     +-------------------------+
Can someone please explain what the error in my approach is? I'm using Stata Version 17.0.

Peter.