Although the most popular and most well known translation for "Hello!" remains "Konnichiwa!" it is not exactly how to say hello in Japanese. Perhaps it is not the most suitable for it. Actually, the correct greeting in English to which "Konnichiwa" is closest in sense, is "Good Day!" or "Good Noon!" and I am sure you won't like greeting a person with a "Good Day!" at any time, more so when you actually want to say "Hello!" whose meaning is very close to "Hi!" or "How do you do?" or "What's up?", and neither do Japanese like saying "Konnichiwa" when they want to say "Hello!"
So, What to do? The problem still remains how to say hello in Japanese. Let's do it the way Japanese do. Use "Ohaiyo Gonzaimasu!" for "Good Morning!" or use "Konnichiwa!" when its noon or use "Konbanwa!" to greet somebody when its afternoon, which is same as "Good Afternoon!" Things differ when you are on phone. Just say "Moshi, Moshi!" which is actually similar to saying "Hello!" over the phone, because one seldom uses "Good Morning!" or "Good Afternoon!" or "Good Evening!" right after one picks up the phone. It is invariably the sweet old "Hello!"
Then in the afternoon the greeting changes to the familar "Kon ni chi wa".
Then if you meet your friends in the evening it will be "Kon ban wa".
"O ya su mi na sa i" is "good night", but only just before you go to bed, so it's mainly used in families. If you leave work late at night you'll have to say "shi tsu re i shi ma su" - "Sorry for being rude and going home before you all"!