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

  • Home
  • SEARCH
  • 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 7169309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:57:48+00:00 2026-05-28T14:57:48+00:00

I got an field named last in MySQL, it has an attribute: datetime so

  • 0

I got an field named last in MySQL, it has an attribute: datetime so the last is displaying like this: 2012-01-27 20:21:35, now I need to update rows with datetime bigger than 2012-01-20 20:00:00 so the query should look similar to:

UPDATE `player`
SET `hh` = `hh` + 1000
WHERE `last` > '2012-01-20 20:00:00'

Ofc. the above example won’t work, but its just a sketch on how it should look like & what I want to reach.

How it can be done in MySQL query? Or maybe I’ll have to use other language for this task?

  • 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-28T14:57:49+00:00Added an answer on May 28, 2026 at 2:57 pm

    Use unix_timestamp

    UPDATE `player`
    SET `hh` = `hh` + 1000
    WHERE unix_timestamp(`last`) > unix_timestamp('2012-01-20 20:00:00')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a table field membername which contains both the last name and the
I've got a legacy database with a bunch of idiotically named columns like: some_field_c
I've got a CSV file with a format that looks like this: FieldName1, FieldName2,
I have got a field that has been setup to allow for Null, but
How could we handle null for a datetime field (got from SQL Server) in
I've got an input field on my plain html form that I would like
I have a controller named sales_controller at this controller I got a function in
I got this table named tb_stock ID AMOUNT FLAG LAST_AMOUNT 1 5 N 0
When you've got a form field such as this: <%= f.text_field :last_name %> it
UPDATE: NOW RESOLVED - Thanks everyone! Fix: I had a column named referred_by and

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.