Breaking

Code Gripper
Responsive Advertisement
  • Home
HomeCarbon

How to change the date format in Laravel view page

byMahabubur Rahman -September 11, 2021
0

Try this:

date('d-m-Y', strtotime($user->from_date));

It will convert the data into d-m-Y or whatever format you have given.


For the above PHP code, you can use Laravel or any other PHP project.


In Laravel use, the Carbon is good

{{ \Carbon\Carbon::parse($user->from_date)->format('d/m/Y')}}


Tags Carbon date Laravel
  • Facebook
  • Twitter

You may like these posts

Post a Comment

Previous Post Next Post

Follow Us

Popular Posts

number

How to get only number from string in Python?

byMahabubur Rahman-September 10, 2021

ModuleNotFoundError: No module named 'psycopg2' django

September 17, 2021

How to change the date format in Laravel view page

September 11, 2021

How to get current day date in JavaScript

August 19, 2021

Subscribe Us

Facebook

Categories

Main Tags

Code Gripper

September 30, 2023

Total Pageviews

Search This Blog

CODE GRIPPER

Code Gripper
CODE GRIPPER

  • Home
  • Python
  • PHP

Menu Footer Widget

  • Home
  • About
  • Contact Us
Code Gripper

About Us

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.

Categories

Main Tags

Latest Posts

Most Popular

How to get only number from string in Python?

September 10, 2021

ModuleNotFoundError: No module named 'psycopg2' django

September 17, 2021

How to change the date format in Laravel view page

September 11, 2021
Design by Blogger | Distributed by Gooyaabi
  • Home
  • About Us
  • Contact Us
  • RTL Version

Contact Form