In short, we've had coffee for around a thousand years, depending on when you feel like the 'legend' around it dates.
As a drink, credible sources place the earliest form of coffee as being found in Yemen in the 15th century, though wine had been made from the coffee fruit for about two hundred years before that. Legends aside, therefore, coffee has been part of the routines of humans for about six hundred years.