I think it honestly depends on your office culture and HOW you wear your hair versus what length it is.
I've worked in numerous offices and I've always had 16- 24 inches of hair.
If the office culture is laid back and not as corporate, with a more younger crowd, sure do whatever with your hair. If it is a corporate or business casual setting, take time to style your hair so it looks coifed. Curling it, pulling it back, pinning the sides.
You can usually match this to your required dress code based in your contract or the office vibe.