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,230
  • 1
  • 14
  • 39
Ni Ya
  • 35
  • 4

1 Answers1

1

Try this.

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

From the stackoverflow answer below

Vaisakh PS
  • 1,093
  • 2
  • 10
  • 18