convert time in seconds to HH:MM:SS format in MySQL?

You can use MySQL function SEC_TO_TIME().

Example:

SELECT SEC_TO_TIME(2378);

Output is:

00:39:38

 

Related Posts

  • 46
    Use =A1/86400 Where A1 holds the time. Format as hh:mm:ss or whatever you need.   You can also try A1=9084 B1==TEXT(A1/(24*60*60),"hh:mm:ss")
    Tags: format, hh:mm:ss, time, seconds, convert
  • 39
    Syntax: IF(expr,if_true_expr,if_false_expr) MySQL IF function is control flow functions that returns a value based on a condition. The IF function is sometimes referred to as IF ELSE or IF THEN ELSE function. If the expr evaluates to TRUE i.e., expr is not NULL and expr is not 0, the IF…
    Tags: function, returns, select, example, mysql
  • 36
    MySQL LOCATE() returns the position of the first occurrence of a string within a string. Both of these strings are passed as arguments. An optional argument may be used to specify from which position of the string (i.e. string to be searched) searching will start. If this position is not…
    Tags: mysql, select, returns, second, function
  • 33
    Very often we need to extract last 30 days, 7 days data from mysql DB. Here we will show easy way to get the data of given interval. SELECT DATE_FORMAT(create_date, '%m/%d/%Y') FROM mytable WHERE create_date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE() Also note that CURDATE() returns only the DATE…
    Tags: select, mysql, time, returns, datetime
  • 31
    The core logic of a database application is performed through SQL statements, whether issued directly through an interpreter or submitted behind the scenes through an API. The tuning guidelines of this post will help to speed up all kinds of MySQL applications. The guidelines cover SQL operations that read and…
    Tags: select, mysql, sql, time

29 thoughts on “convert time in seconds to HH:MM:SS format in MySQL?

  • February 9, 2015 at 10:27 pm
    Permalink

    Howdy! Someone in my Facebook group shared this website with us so I came to look it
    over. I’m definitely loving the information.
    I’m bookmarking and will be tweeting this to my followers!

    Wonderful blog and brilliant design.

    Reply
  • February 9, 2015 at 10:47 pm
    Permalink

    Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something.
    I think that you could do with a few pics to drive the message home a little bit, but instead of that, this is fantastic blog.
    A great read. I’ll definitely be back.

    Reply
  • February 9, 2015 at 11:00 pm
    Permalink

    Excellent article. Keep posting such kind of info on your blog.
    Im really impressed by it.
    Hello there, You’ve performed an incredible job. I will definitely digg it and in my
    opinion recommend to my friends. I’m sure they will be benefited from this site.

    Reply
  • February 9, 2015 at 11:07 pm
    Permalink

    Woah! I’m really enjoying the template/theme of this website.
    It’s simple, yet effective. A lot of times it’s hard to get that “perfect balance” between usability and visual
    appearance. I must say you have done a fantastic job with this.
    Additionally, the blog loads very fast for me on Safari.
    Exceptional Blog!

    Reply
  • February 9, 2015 at 11:17 pm
    Permalink

    It’s actually a cool and helpful piece of information. I am glad that
    you simply shared this useful information with us.
    Please stay us up to date like this. Thank you for sharing.

    Reply
  • February 13, 2015 at 11:58 pm
    Permalink

    Hello, yes this piece of writing is actually good and
    I have learned lot of things from it regarding blogging.
    thanks.

    Reply
  • February 17, 2015 at 9:25 am
    Permalink

    Way cool! Some extremely valid points! I appreciate you penning this article plus the rest of the site is also really
    good.

    Reply
  • February 18, 2015 at 3:25 am
    Permalink

    I ƿay a quick visіt every dayy a few websites and blogs to rеad posts, but this web site
    providеs feature bsed wrіting.

    Reply
  • February 19, 2015 at 12:47 pm
    Permalink

    Hi! Someone in my Myspace group shared this website with us
    so I came to take a look. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers!
    Wonderful blog and terrific style and design.

    My page – paid surveys reviews

    Reply
  • February 21, 2015 at 12:29 am
    Permalink

    Because the admin of this web site is working,
    no uncertainty very shortly it will be famous, due to its
    feature contents.

    Reply
  • March 8, 2015 at 12:10 am
    Permalink

    It’s going to be finish of mine day, except before end I am reading this wonderful paragraph
    to improve my know-how.

    Reply
  • March 16, 2015 at 8:25 am
    Permalink

    Incredible! This blog looks just like my old one!
    It’s on a totally different topic but it has pretty much the same
    page layout and design. Wonderful choice of colors!

    Reply
  • March 16, 2015 at 11:18 am
    Permalink

    Great blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple tweeks would really make my blog shine.
    Please let me know where you got your theme. Cheers

    Reply
  • March 16, 2015 at 12:03 pm
    Permalink

    And because of the rapid availability of Android, you can see almost every artists
    are using this amazing phone, that is why our gambling software providers
    also hit them. Often, these are characterized by low self-esteem, and identify your model camera together with his social position. Definitely
    the simplest from the Windows Mobile football manager games, but a fantastic game
    nonetheless, specifically for retro gamers.

    Reply
  • March 16, 2015 at 12:40 pm
    Permalink

    You actually make it seem so easy with your presentation but I to find this matter to be really something
    that I feel I would never understand. It sort of feels too complex and very vast for me.

    I’m taking a look ahead to your subsequent post, I’ll try to get the hang of it!

    Reply
  • March 20, 2015 at 7:48 am
    Permalink

    I think the admin of this site is genuinely working hard in favor of his site, as here every data is quality based stuff.

    Reply
  • March 22, 2015 at 3:36 pm
    Permalink

    Heya are using WordPress for your site platform?
    I’m new to the blog world but I’m trying to get started and create my own. Do you need
    any html coding knowledge to make your own blog?
    Any help would be really appreciated!

    Reply
  • March 23, 2015 at 3:45 am
    Permalink

    What’s up Dear, are you in fact visiting this site daily,
    if so after that you will definitely obtain pleasant knowledge.

    Reply
  • March 23, 2015 at 7:06 am
    Permalink

    It’s perfect time to make a few plans for the long run and it’s time to
    be happy. I have read this put up and if I may just I desire to counsel you some attention-grabbing issues or tips.
    Perhaps you can write next articles referring to this article.
    I want to read even more issues approximately it!

    Reply
  • April 19, 2015 at 5:00 pm
    Permalink

    This piece of writing provides clear idea in support of the new people of
    blogging, that actually how to do running a blog.

    Reply
  • December 21, 2015 at 12:53 am
    Permalink

    Its such as you learn my thoughts! You appear to know a lot approximately this, such
    as you wrote the guide in it or something. I feel that you could do with some percent
    to pressure the message house a little bit, however instead of that, that
    is wonderful blog. An excellent read. I will certainly
    be back.

    Review my weblog Millionaire Shield

    Reply

Leave a Reply

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

%d bloggers like this: