0

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)

2
Contributors
2
Replies
4
Views
8 Years
Discussion Span
Last Post by ROTC89
0

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

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.