ok so i am working on a program that has a table of all the presidents and info on each of them. i tried to insert the date of their birthdays and deaths, but just got 0000-00-00 for a result when i went to see what the outcome looked like. help please

this is what i did to input it in.

INSERT INTO president_info (id, name, mname, last, bdate, ddate, yr_sworn, yr_left, party, home_town, state,vp) VALUES (1, 'George', 'n/a', 'Washington', 1732-02-22, 1799-12-14, 1789, 1796, 'Federalist', 'Westmoreland', 'Virginia', 'John Adams');
SELECT * FROM president_info;

+----+--------+-------+------------+------------+------------+----------+---------+-----------+--------------+----------+------------+
| id | name | mname | last | bdate | ddate | yr_sworn | yr_left | party | home_town | state | vp |
+----+--------+-------+------------+------------+------------+----------+---------+-----------+--------------+----------+------------+
| 1 | George | n/a | Washington | 0000-00-00 | 0000-00-00 | 0000 | 0000 | Federalist | Westmoreland | Virginia | John Adams |
+----+--------+-------+------------+------------+------------+----------+---------+-----------+--------------+----------+------------+
1 row in set (0.00 sec)

I see you already marked thread as solved. Did you get your solution? If so would you mind to share it with others?

well i solved the problem. i am not able to use the date function because the years i am using are before 1900s. you can only use the date when its between 1900 - 2036 or something similar to it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.