Convert Moodle Timestamp fields to Date

I get really frustrated with Moodle for using int fields to store dates. They store it in the Unix (Epoch) format. Here’s how to make it more readable.

To convert it to a readable date, use
FROM_UNIXTIME(int)
You can also get more formatting control with something like:
FROM_UNIXTIME(int, '%Y %D %M %h:%i:%s %x')

 

About Nate

I currently live south of Champaign, IL in an old farm house with my wife and 6 kids. I spend most of my free time keeping our house and barn in some sort of decent shape and programming for the fun of it. Of course with 6 kids there’s also a lot of diaper changing, teaching, playing, consoling, punishing, and other fun parental stuff.
This entry was posted in Technology and tagged , , . Bookmark the permalink.

25 Responses to Convert Moodle Timestamp fields to Date

  1. Nate Baxley says:

    Palmira Grav says
    I am going to be a junior in high school in a month when school starts and I want to start looking at schools. I am really interested in creative writing and literature. What are some good schools for that? I also want to study philosophy. . . Thanks!.

  2. Nate Baxley says:

    Windows 7 Home Premium Key says
    Magnificent goods from you, man. I’ve understand your stuff previous to and you are just extremely excellent. I really like what you’ve acquired here, really like what you’re stating and the way in which you say it. You make it entertaining and you still care for to keep it smart. I can not wait to read much more from you. This is actually a tremendous website.

  3. Nate Baxley says:

    Sherwood Tortora says
    Awesome writing style!

  4. Nate Baxley says:

    Knightsbridge UGGs clearance says
    I such as this article very much, wish you can write much more about this.

  5. Nate Baxley says:

    Emerson Shayne says
    Spot on with this write-up, I actually assume this website needs much more consideration. I’ll probably be once more to learn much more, thanks for that info.

  6. Nate Baxley says:

    kids ugg sale says
    I have observed which on the internet training gets preferred because having your diploma online has turned into a popular selection for lots of people. A lot of people possess definitely not had a opportunity to go to an ordinary college or university yet seek the raised earning possible along with a much better job that the Bachelors Degree provides. Nevertheless other people may have a diploma in one discipline however desire to go after something these people right now create an interest in.

  7. Nate Baxley says:

    louis vuitton watches for men says
    This is my very first time i click here. I discovered therefore a number of of enjoyable stuff within your blog, particularly its dialogue. by using the a lot of comments on your content articles, I suppose I’m not the only one obtaining all of the leisure here! Keep up the actual beneficial function.

  8. Nate Baxley says:

    Meghan Hanoa says
    Do you mind if I posted this article on my web site? I would give you credit and a link back to your site. Thanks, and if possible let me know here!

  9. Nate Baxley says:

    glass etching says
    Thanks, I have recently been hunting for information about this subject matter for ages and yours is the best I have found so far.

  10. Nate Baxley says:

    tratamento pra celulite says
    I’d need to examine with you here. Which is not something I usually do! I enjoy studying a put up that can make folks think. Additionally, thanks for permitting me to comment!

  11. Nate Baxley says:

    Lacie Symkowick says
    Great Post. I like your style of writing. I think you should use your awesome writing style to get paid. Me and my husband are using this course http://hopclicks.com/respectmoney to improve our earning from writing articles. You should try this out.

  12. Nate Baxley says:

    Tratamento para celulite says
    I’m impressed, I have to say. Really hardly ever do I encounter a blog that’s both educative and entertaining, and let me let you know, you will have hit the nail on the head. Your idea is outstanding; the difficulty is one thing that not enough individuals are speaking intelligently about. I am very joyful that I stumbled throughout this in my search for one thing regarding this.

  13. Nate Baxley says:

    new england patriots jerseys says
    Among the finest to inform a person that i’m simply all new to running a blog and definitely loved you are website. Most likely I will bookmark your website . You have outstanding posts. Thanks for sharing with us your site.

  14. Nate Baxley says:

    new york giants jerseys says
    Cheers for the high quality writeup. Furthermore, how could all of us talk?

  15. Nate Baxley says:

    England Patriots Season tickets says
    appreciate your own article,My issue continues to be solved.

  16. Nate Baxley says:

    Pegperego Review says
    Audio started playing anytime I opened up this blog, so frustrating!

  17. Nate Baxley says:

    cheap software games says
    I am continuously browsing online for articles that can help me.

  18. Nate Baxley says:

    no third party lenders says
    I want to take this moment to say that I really love this blog. It has been a good resource of information for me in my research. Thank you so much.

  19. Nate Baxley says:

    evening wear,maternity wear,http://www.officeswear.info/ says
    I recently came across your post and also have already been reading through together. I want to express my personal admiration of your writing skill and ability to make visitors read from the beginning to the end. I must read newer articles and also to share my personal ideas with you.

  20. Nate Baxley says:

    buy xp professional says
    Thanks for the post. I thought it was interesting.

  21. Nate Baxley says:

    evening wear,maternity wear,http://www.officeswear.info/ says
    First off, I wish to thank you within the stellar as well as educational access. I will have to acknowledge which usually, I have not noticed concerning this info. We have observed a number of new information for reason. Thanks plenty with regard to providing this effective and interesting information. We’re waiting pertaining to additional exciting posts because of you against the closest long run.

  22. Nate Baxley says:

    pittsburgh steelers jersey says
    Many thanks a ton for the great writeup. Mind you, exactly how might all of us talk?

  23. Nate Baxley says:

    Burton says
    You made some decent points there. I looked on the internet for the issue and found most individuals will go along with with your website.

  24. Nate Baxley says:

    Atlanta Falcons Jerseys says
    The blog post is worth reading. The distinctiveness and structure which reflects from this post. Now-a-days weblogs are used almost everywhere. The idea that we get from their store tend to be unevitable. The actual attribute required is the energy associated with creativity within yourself through understanding, considering, creating as well as demanding study. Therefore the article is actually immensely helpful for the readers. Thanks a lot for composing this kind of awesome article. I will wait for your future article with excellent curiosity

  25. Nate Baxley says:

    buy viagra soft tabs says
    Hi there, in my opinion that saw you’ll been to my blog site as a result i just stumbled on “return typically the favor”.I’m hunting for circumstances to advance my best online business!I’m assuming it really is o . k . to use several your ideas!!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>