In France, a formal approach is de rigueur (mandatory) if you want to converse with a person whom you don't know at all or very well. Don't commit a faux pas (mistake) by addressing someone informally before you have established a strong friendship or relationship. Start and end your conversations correctly by consulting Tables 1 and 2.
Note that vous expresses “you” in formal conversation, whereas tu expresses “you” in informal conversation.
After sunset, bonsoir is used as a greeting. Use bonne nuit if you are about to retire for the night.