Could anybody say me how to write periods of time in English. For example, I know how to say in case of years: from one year to another year. But how to deal with hours. Is it the same? from 5 am to 6 pm or till 6 pm?
You can use either approach. You sleep from 12 AM to 7 AM. You work from 8:30 AM till 5:30 PM. The word "till" is just a shortened version of "until", so if you work from 8:30 AM till 5:30 PM, you probably also relax at home from 5:30 PM until you go back to work the next day. It's all correct, though generally people would only use "until" or "till" when talking about time frames on the same day (like, "Today I work from 8:30 AM till 5:30 PM,").