ENgetpatternindex function

Retrieve the index a time pattern.