How7o
  • Home
  • Marketing
    MarketingShow More
    The Beginner’s Guide about Facebook Advertising
    6 Min Read
    64 Creative Marketing Ideas to Boost Your Business
    6 Min Read
  • Resouce
    ResouceShow More
    5 Must-Have Digital Marketing Data Sources
    6 Min Read
    Archival Solution Deployment Best Practices
    6 Min Read
    How Secure Your Mobile Device in Six Steps
    6 Min Read
    5 Effective Ways to Increase Market Share Online
    6 Min Read
    Tips Debugging with CMS code Optimization Quick
    6 Min Read
  • Features
    FeaturesShow More
    7 Things You Need to Know About Feature Driven
    6 Min Read
    Turn an Excel Spreadsheet or Google Sheets Doc
    6 Min Read
    3 Common Ways to Forecast Currency Exchange
    6 Min Read
    Step by Step Guide to a Technical SEO Audit
    6 Min Read
    10+ Free Tools to Make Your Own Animated GIFs
    6 Min Read
  • Guide
    GuideShow More
    Create an Engagement Custom Audience from Video
    6 Min Read
    The Ultimate Guide, Easily Make Videos Tutorials
    6 Min Read
    Tips to Keep Your Cloud Storage Safe and Secure
    6 Min Read
  • Contact
  • Blog
Reading: How to Show Only Hours and Minutes in Laravel Blade (HH:MM)
Share
Subscribe Now
How7oHow7o
Font ResizerAa
  • Marketing
  • Resouce
  • Features
  • Guide
  • Complaint
  • Advertise
Search
  • Categories
    • Marketing
    • Resouce
    • Features
    • Guide
    • Lifestyle
    • Wellness
    • Healthy
    • Nutrition
  • More Foxiz
    • Blog Index
    • Complaint
    • Sitemap
    • Advertise
Follow US
Copyright © 2014-2023 Ruby Theme Ltd. All Rights Reserved.
How7o > Blog > Web Development > How to Show Only Hours and Minutes in Laravel Blade (HH:MM)
Web Development

How to Show Only Hours and Minutes in Laravel Blade (HH:MM)

how7o
By how7o
Last updated: January 12, 2026
3 Min Read
Laravel Blade Time Format (HH:MM)
SHARE

I hit this while building a simple schedule page in Laravel. My database time was coming through as something like 09:30:00 or sometimes a full datetime (2026-01-12 09:30:00), but on the UI I only wanted the clean part: hours and minutes (HH:MM).

Contents
  • Best method: Use Carbon format(‘H:i’) in Blade
  • 12-hour format (AM/PM)
  • Cleanest approach for projects: Create a model accessor
  • Quick fallback: If the value is always like 09:30:00
  • Timezone note (important if you store datetimes)
  • Outbound + internal links (helps Yoast)
  • Final thoughts

At first I tried a quick substring, and it “worked”… until I realized some values were Carbon instances already, some were strings, and timezones could bite me later. So I switched to a proper approach using Carbon formatting. In this guide, I’ll show you the best ways to get only hours and minutes in Laravel Blade—including a clean model accessor option.

Best method: Use Carbon format(‘H:i’) in Blade

If your value is already a Carbon instance (common with created_at, updated_at, and casted datetime columns), this is the simplest:

{{ $model->created_at->format('H:i') }}

Result: 09:30

If your value might be a string, parse it first:

{{ \Carbon\Carbon::parse($time)->format('H:i') }}

This handles:

  • 09:30:00
  • 2026-01-12 09:30:00
  • Most reasonable time/datetime strings

12-hour format (AM/PM)

If your audience prefers AM/PM, use:

{{ \Carbon\Carbon::parse($time)->format('h:i A') }}

Result: 09:30 AM

Cleanest approach for projects: Create a model accessor

When I realized I needed HH:MM in multiple Blade files, I stopped repeating formatting in views and moved it into the model. This keeps Blade clean and avoids copy/paste formatting everywhere.

Example: if you have a column called start_time (stored as time or datetime), add an accessor in your model:

// app/Models/Event.php
public function getStartTimeHmAttribute()
{
    if (!$this->start_time) return null;

    return \Carbon\Carbon::parse($this->start_time)->format('H:i');
}

Now in Blade you can simply do:

{{ $event->start_time_hm }}

This is the approach I recommend if the same formatting is used in multiple places.

Quick fallback: If the value is always like 09:30:00

If you are 100% sure your value is always HH:MM:SS, the quick (but less flexible) option is trimming the string:

{{ substr($time, 0, 5) }}

I only use this in small projects or when the value is guaranteed to be a TIME string. Otherwise, Carbon is safer.

Timezone note (important if you store datetimes)

If your column is a full datetime and your app uses timezones, make sure you’re formatting in the correct timezone. For example:

{{ $model->starts_at->timezone(config('app.timezone'))->format('H:i') }}

For plain TIME fields (only time, no date), timezone usually isn’t involved—but for real schedules using datetimes, it matters.

Outbound + internal links (helps Yoast)

  • Carbon documentation (date/time formatting)
  • PHP date() / DateTime formatting reference
  • How to check if GD library is installed in PHP
  • How to create a directory in Ubuntu

Final thoughts

If you want the best “always works” solution, use Carbon: format('H:i'). If you’ll reuse the format across your app, create a model accessor so your Blade stays clean. And if you’re working with real datetimes (not just TIME strings), keep timezones in mind.

TAGGED:AccessorsBladeCarbonDate FormatEloquentLaravelphpTime Format

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Previous Article Display only the current date in Laravel using Carbon How to Display Only the Current Date in Laravel (Carbon Examples)
Next Article Check if GD library is installed in PHP (phpinfo and extension_loaded) How to Check if GD Library Is Installed in PHP (3 Easy Methods)
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

FacebookLike
XFollow
PinterestPin
InstagramFollow

Subscribe Now

Subscribe to our newsletter to get our newest articles instantly!
Most Popular
How I Fixed Composer Dependency Errors
How I Fixed Composer Dependency Errors Using the –ignore-platform-reqs Flag (Step-by-Step Guide)
January 12, 2026
Transfer Discourse to a new server
How to Transfer Discourse to a New Server on AlmaLinux (Backup + Restore, Step-by-Step)
January 12, 2026
Installed Discourse on AlmaLinux
How I Installed Discourse on AlmaLinux (Docker Method, Step-by-Step)
January 12, 2026
Installing Docker on AlmaLinux guide
Install Docker on AlmaLinux: Step-by-Step (Docker CE + Compose)
January 12, 2026
Change welcome message on Ubuntu VPS server (MOTD + SSH banner)
Change Welcome Message on Ubuntu VPS (MOTD + SSH Banner)
January 12, 2026

You Might Also Like

Display only the current date in Laravel using Carbon
Web Development

How to Display Only the Current Date in Laravel (Carbon Examples)

4 Min Read
Send a simple email in Laravel using Mail::raw and SMTP
Web Development

How to Send a Simple Email in Laravel (Fast SMTP + Mail::raw)

4 Min Read
Check if GD library is installed in PHP (phpinfo and extension_loaded)
Web Development

How to Check if GD Library Is Installed in PHP (3 Easy Methods)

5 Min Read

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!
How7o

We provide tips, tricks, and advice for improving websites and doing better search.

Latest News

  • SEO Audit Tool
  • Client ReferralsNew
  • Execution of SEO
  • Reporting Tool

Resouce

  • Google Search Console
  • Google Keyword Planner
  • Google OptimiseHot
  • SEO Spider

Get the Top 10 in Search!

Looking for a trustworthy service to optimize the company website?
Request a Quote
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?