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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:58:38+00:00 2026-06-09T16:58:38+00:00

The DATETIME type is used for values that contain both date and time parts.

  • 0

The DATETIME type is used for values that contain both date and time
parts. MySQL retrieves and displays DATETIME values in ‘YYYY-MM-DD
HH:MM:SS’ format. The supported range is ‘1000-01-01 00:00:00’ to
‘9999-12-31 23:59:59’. (http://dev.mysql.com/doc/refman/5.5/en/datetime.html)

ALLOW_INVALID_DATES

Do not perform full checking of dates. Check only that the month is in
the range from 1 to 12 and the day is in the range from 1 to 31. This
is very convenient for Web applications where you obtain year, month,
and day in three different fields and you want to store exactly what
the user inserted (without date validation). This mode applies to DATE
and DATETIME columns. It does not apply TIMESTAMP columns, which
always require a valid date.
(http://dev.mysql.com/doc/refman/5.5/en/datetime.html)

If I type

SHOW VARIABLES LIKE ‘datetime%format’;

it says: %y- %m- %d %H: %i: %s

I tried to insert 1999-04-26 13:00:00 and says wrong syntax.

I tried to add to the table *ALLOW_INVALID_DATES* after declaring the DATETIME, then tried at the end of the table creation and error.

I’m puzzled…

Thank you for your time

  • 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-06-09T16:58:40+00:00Added an answer on June 9, 2026 at 4:58 pm

    This works fine for me:

    CREATE TABLE abc ( daterow DATETIME);
    
    INSERT INTO abc(daterow) VALUES('1999-04-26 13:00:00');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In mysql database i have this column called: Name: Date Type: datetime I have
Which data type is used to store date time (not only date but also
I want to SELECT a formatted date string from a datetime type in SQL
I need to convert my string date to datetime type. Here's one date scenario:
I have a MySQL table and a column of type datetime. It's default value
I have a table abc with a field datetime_abc type-> DATETIME in mysql. and
I wanted to assign null value to DateTime type in c#, so I used:
I have a last_notified column on my MySQL table, data type DATETIME I want
Two tables. I have column a (datetime type) and column b (numeric type) in
A column name rcvdate, which is having datetime type, the value is like this:

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.