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 4331582
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:07:52+00:00 2026-05-21T10:07:52+00:00

Hey there — Doing a simple TIMESTAMPDIFF query and I keep getting an error

  • 0

Hey there —
Doing a simple TIMESTAMPDIFF query and I keep getting an error for my query.
I tried the exact same query on a MySQL 5.5 engine and it worked fine..

SELECT TIMESTAMPDIFF(SECOND, current_timestamp(), current_timestamp()) AS time;

This is just a simple query to test the function out, normally it would return 0 on MySql 5.5, but on my 5.0 database it fails to run..

I’ve looked up if the function wasn’t yet implemented, and it seems that in 5.0 it was introduced.. so not sure why this isn’t working? I’ve checked the documentation on this function in 5.0 manual and it seems to be the same as 5.5..

Anyone know the work around?
Thanks in advance

  • 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-21T10:07:53+00:00Added an answer on May 21, 2026 at 10:07 am

    It seems there were some bugs with that function, on old versions of MySQL 5.0.x — here’s an example : Erratic behaviour of TIMESTAMPDIFF()

    Note that MySQL 5.0.3 is really old — you really should update to a more recent version :

    • You’ll get more support
    • Lots of bug fixes
    • New features and enhancements
    • And, probably, better performances
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey there. I would really appreciate your help in creating a query that would
Hey there, I'm new to mySQL, so my poor knowledge of the languages might
Hey there, I keep hearing over and over again that I should ALWAYS use
Hey there, I've got a block of HTML that I'm going to be using
Hey I was wondering if there were any way to upload images in ASP?
Hey, is there any built in functions or something like that in php that
Hey, in the Programming Pearls book, there is a source code for setting, clearing
Hey there, I'm trying to perform a backwards regular expression search on a string
Hey there I got a problem with my code, I compared three ways of
Hey there guys and gals. I'm very new to php and am following various

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.