Q1. Yes, stationary bikes can be quite effective at losing weight.
Q2. There is no limit on how long you can use it. The stationary bike is a very safe and healthy means of exercise.
For adults the Surgeon General recommends at least 30 minutes a day of moderate exercise (a 5 or 6 on a scale of 10) or 20 minutes a day of vigorous exercise (a 7 or 8). This will keep you healthy, and the more vigorous exercise you do, the more fit you will become.