I created a workstation that allowed my screen to be at eye height and keyboard/mouse to be at the right height for my elbows to be at right-angles. That was by far the most comfortable position to stand and type/mouse from. Later on I found having the mouse higher actually helped too with arm ache.
As for how long I could stand for, the first week was not a problem. I was doing 8am-1pm followed by 30 minutes sitting down, and then 1:30pm-6pm without a break other than a walk to the toilet occasionally.
From week two my legs really started to ache from the kneee down, I found myself leaning on the desk to take away the pressure. Investigating why this was happening I found it is to do with keeping your legs stationary as the muscles can cramp or just go stiff. The solution is to keep moving so a cheap manual treadmill should do the trick. The alternative of taking frequent breaks doesn't work as it breaks concentration.
If you have to do this for a couple of weeks then you should be able to cope, if you want to make a "change for life" then come up with some way to keep moving while working.
For those who do sit down all day and don't have back problems a word of caution. Sitting all day makes your lower back very stiff, but you won't notice this until you try to do something and hurt yourself. It may be a lifting task that an unstiff back could cope with. Taking time to exercise and stretch can save you such a disaster, I am healing well now, but still get twinges and have to be carefull.