Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6222953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:24:18+00:00 2026-05-24T08:24:18+00:00

In MySQL I can create a table with a time field, and the value

  • 0

In MySQL I can create a table with a time field, and the value can be as high as 838:59:59 (839 hours – 1 second). I just read that in PostgreSQL, the hour field cannot exceed 23:00:00 (24 hours). Is there a way around this? I’m trying to make a simple DB that keeps track of how many hours & minutes were spent doing something, so it’ll need to go higher than 23 hours & some minutes. I can do this in MySQL, but I need to use PostgreSQL for this. I Googled, but didn’t find what I’m looking for, so I’m hoping I just didn’t use the right keywords.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:24:21+00:00Added an answer on May 24, 2026 at 8:24 am

    Although they use the same notation, there’s a difference between time of day and elapsed time. Some of their values overlap, but they’re different domains. 838 isn’t a valid value for an hour if you’re talking about a time of day. 838 is a valid value for an hour if you’re talking about elapsed time.

    This distinction leads to two different data types: timestamp and interval.

    create table intervals (
      ts timestamp primary key,
      ti interval not null
    );
    
    insert into intervals values (current_timestamp, '145:23:12');
    
    select *
    from intervals;
    
    2011-08-03 21:51:16.837    145:23:12
    
    select extract(hour from ti)
    from intervals
    
    145
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can we create a new MySQL database( not a table, I want a new
In MySQL, I can create an access a session variable by using a single
Possible Duplicate: How I can create installer for website. PHP mysql I'm looking to
Date and time in MySQL can be stored as DATETIME, TIMESTAMP, and INTEGER (number
I've learned that MySQL can compress communication between servers and clients. Compression is used
Can MySql 5.0 views use tables that are located on another server? What is
My MySQL database can store the euro symbol just fine (as I have tested
How do I create an index on the date part of DATETIME field? mysql>
I have a mySql query which adds certain interval of time to datetime field.
Database is MySQL with MyISAM engine. Table definition: CREATE TABLE IF NOT EXISTS matches

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.