Let's say I traveled for 6 hours and 40 min. How should I write that?
6 hours and 40 min
or
6.40 hours
or
6.40 min
or
6h.40 min
Let's say I traveled for 6 hours and 40 min. How should I write that?
6 hours and 40 min
or
6.40 hours
or
6.40 min
or
6h.40 min
My suggestion is to write them in the way that most clearly communicates what you are trying to say. If you are informing someone of how long your trip took, 6 hours (and) 40 minutes is fine. If it's clear from the context that it is a duration you could write 6:40, but this can be unclear whether you are referring to a time of day, minutes and seconds, or hours and minutes, so I wouldn't recommend it.
If you are comparing durations, 6.67 hours could be the best choice. For example, if you were comparing the times to finish a task, and one person completed it in 6.67 hours and a second person completed it in 6.72 hours. This is usual for academic or scientific writing and unusual for general writing.
The preferred way depends on the context, but in general the way that is clearest is to spell it out as 6 hours and 40 minutes.
In English, parts of time are conventionally separated by colons (:). If it's clear that you're talking about a fairly large amount of time (i.e., not minutes:seconds), you can use that without any other notation:
The flight took 6:40, so I'm pretty tired.
Or to be a little more easily pronounceable, you can use h and m:
The flight took 6h40m, so I'm pretty tired.
This is similar to the example you gave of "6h.40 min", but shorter.
If you want to spell it out more, at the cost of more words, there's not really anything wrong with putting everything in:
The flight took six hours and forty minutes, so I'm pretty tired.
(Here, you should not use the digit 6, by convention — it's small enough [less than 10 or so] and being used as a word inline in a sentence, rather than a digit in a number — and therefore writing 40 in digits looks awkward next to it, so it should be avoided as well.)
"6:40 hours" isn't especially ambiguous, but it's unusual and (to my California eye) looks weird — pronouncing it aloud or mentally leads to backtracking in order to get the right meaning. It's probably best to avoid this.
In "6:40 min", nobody will be sure whether you mean hours:minutes or minutes:seconds, so it's not only awkward, but ambiguous. Avoid at all costs.
Strictly speaking, the last example you gave works as written, especially in a more scientific context. But unless you're very clearly writing nothing but decimal numbers, it's a dangerous formulation in general, since other quantities like "6.20 hours" are ambiguous: did you mean 6.2000000 hours, or 6 hours and 20 minutes? (Especially if your writing suggests English is a second language, since other languages often use other delimiters for time, dates, etc.)