1

Hi I would like to ask you a question I would like to format date "01-Sep-2017" in laravel the below is my code.

$toDate = Carbon::now()->format('dd-MMM-yyyy');
Lizesh Shakya
  • 2,482
  • 2
  • 18
  • 42
Ni Ya
  • 35
  • 1
  • 5

1 Answers1

1

Try this.

$toDate = date('d-M-y', strtotime("01-Sep-2017"));

From the stackoverflow answer below

Vaisakh PS
  • 1,181
  • 2
  • 10
  • 19