In what year was Hanzhong, Shaanxi Province divided into Shaanxi Province?

1262.

When the Yuan Dynasty established Shaanxi Province in 1262, Hanzhong, south of the Qinling Mountains, and Guanzhong and northern Shaanxi, were included in the same administrative region (Yuan: Shaanxi Province; Ming: Shaanxi Political Department; Qing: Shaanxi Province).

Before the Yuan Dynasty, Hanzhong, south of the Qinling Mountains, and Guanzhong and northern Shaanxi, north of the Qinling Mountains, all belonged to different administrative regions.

Qin: Hanzhong in the south of Qinling belongs to Hanzhong County, Guanzhong in the north of Qinling belongs to internal history, and northern Shaanxi belongs to the county;

Han: Hanzhong, south of Qinling Mountains, belongs to Hanzhong County, Guanzhong, north of Qinling Mountains, belongs to Jing County.

During the Three Kingdoms Period: Hanzhong belonged to Shu in the south of Qinling Mountains, and Guanzhong belonged to Wei in the north of Qinling Mountains;

Tang: Hanzhong, south of Qinling Mountains, belongs to Shannan Road, while Guanzhong, north of Qinling Mountains and northern Shaanxi belong to Guannei Road.

Song Dynasty: Hanzhong, south of Qinling Mountains, belongs to Lizhou Road, and Guanzhong, north of Qinling Mountains, belongs to Shaanxi Road.