-3

I have UTC time as: 2021-01-30T21:00:00.000Z

How to convert it to datetime type for adding to database using Carbon?

I have tried this:

Carbon::now(new Date("2021-01-30T21:00:00.000Z"))->format("yyyy-dd-mm");

1 Answers1

0

You can try this...Carbon::parse('2021-01-30T21:00:00.000Z')

Md Somir
  • 570
  • 5
  • 10