When it comes to using it in various social contexts, you should know that Konnichiwa can be used safely in all kinds of situations (only between morning and evening; never early in the morning or late at night) except for those involving very close friends.