Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fogley's avatar

Parse date according to specific format

I trying to parse user submitted dates that vary wildly in format. So, to accommodate this I enable users to set the used format so that the system can save dates in a consistent format.

But, I cannot figure out if it's at all possible to tell Carbon to parse an arbitrary date string in a given format. And, if not: Is there any other realistic solution to this problem?

0 likes
2 replies

Please or to participate in this conversation.