The city of Trondheim was established on 1 January 1838 ( see formannskapsdistrikt ) .
The city of Trondheim became a municipality January 1 , 1838 .