Did you know there are three different kinds of dashes?
A hyphen is a very short dash that connects compound words (i.e. custom-built), or grouped numbers (like a phone number). It is also seen at the end of a line when a word has been broken for spacing reasons.
Slightly longer, an en-dash is used with ranges of either numbers or text (i.e. 2015–2016 or September–December).
In a piece of writing, you should use the long em-dash in place of commas to separate an inserted thought or clause from the main idea of a sentence. (i.e. Another week passed—a week that felt like an eternity.) An em-dash is also used to show interrupted dialogue.
Do not insert spaces between your text and dashes.