Modify Working And Nonworking Times. Using Tools Change working time. Click the Non-working time tab and then select a color and a pattern to represent nonworking time in the Gantt Chart view.

To have the right to request flexible working you must. Using Tools Change working time. Once you have all the calendars you will need for your project you can start assigning them to the project tasks andor resources.
Here is the article that explains how to do it.
Click on the letter S which means Monday and set the time from 1000 to 1400 and then from 1430 to 2000 exactly as you need. You can build custom calendars by going to Project Properties Change Working Time. Format nonworking time in the Gantt Chart In the Task or View tab click Gantt Chart in the View or Task Views section. On the Project Tab in the Properties group click Change Working Time.