Microsoft Excel usually detects and formats a time value when entered into a cell. However, if Excel fails to recognize your input, use the TIME function, which has a straightforward syntax.