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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:28:08+00:00 2026-05-29T06:28:08+00:00

I use the query: UPDATE `times` SET `date` = 2012-04-04 WHERE `id` = 1

  • 0

I use the query:

UPDATE `times` SET `date` = 2012-04-04 WHERE `id` = 1 AND `id2` = 2;

It shows an update successful, but the time shows 000-00-00.
any clue?

When i use phpMyadmin the filed will show what data I want to put in. After putting in the same information, the data changes. But how come sql doesn’t?

Am I using the wrong data format for date?

  • 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-29T06:28:08+00:00Added an answer on May 29, 2026 at 6:28 am

    You need to enclose date with single quotes.

    UPDATE times SET date = '2012-04-04' WHERE id=1 AND id2 =2;
    

    Your previous statement was probably trying to update date to a numeric value of 2004 (2012 minus 4 minus 4).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use this MySQL query: SET @a:=0; UPDATE tbl SET sortId=@a:=@a+1
I am trying to use an update query to update the first 3 characters
if i use this query thath creates a table(look Table1), But VisitingGap column is
I have an old query that looks UPDATE table1 SET date_time_field = NOW() +
I use query string to access my pages. I try to make if anyone
Query parameters : http://example.com/apples?order=random&color=blue Matrix parameters : http://example.com/apples;order=random;color=blue When should one use query parameters
Can I use a query in MSSQL to get the .mdf and .ldf filename/location
I need to use a query which will pull data from a field when
I want to use a query like: sql(select name where id > 10 and
Can a select query use different indexes if a change the value of a

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.