The majority of Chinese people visit Huashan for no more than 1-2 days
1 day is completely doable as day trip from Xi'an (but will be a long day). There are a lot of high speed trains going between Xi'an and Huashan and the trip only takes 30min-1hour.
Huashan itself will take 6-10 hours, depending on how much it you want to see. The quickest way to see it is to take the cable car up up the West Peak, then hike to South Peak, East Peak, Central Peak, North Peak, and then finally take the cable car down from North Peak
Personally I visiting Huashan for 2 days, because:
One of the most famous thing to do in Huashan is watching the sunrise atop the East Peak. It will require 2 days because you will need to either spend the night at a lodge on Huashan or climb up the night before. See this for more details