Convert a string to a integer

Published 1 week ago by sami2500

The input date value is displayed as follows

"2014-10-20"

I want to be numeric so that the converting function can be registered in the table

2014-10-20
joshuafranks

If you're wanting to convert it to a Carbon instance, you can just use Carbon's parse() method:

Carbon::parse("2014-10-20")

That will return a Carbon instance of the date provided.

Please sign in or create an account to participate in this conversation.