SQL Insert not working

I have a very simple insert into statement (am trying to teach myself SQL) and from the searches on the web, it should work, but I keep getting a conversion error on thedate.

INSERT INTO album (id, title, artist, label, released) VALUES (11,'Hendrix in the West','Jimi Hendrix','Polydor',CAST('1972-01-00' As Date))

I also tried:
INSERT INTO album (id, title, artist, label, released) VALUES (11,'Hendrix in the West','Jimi Hendrix','Polydor',CAST('1972-01-00' As Date)AS 'date')
but it did not work either.  This is on SQL Server Express 2010
Sandra SmithRetiredAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Simone BSenior E-Commerce AnalystCommented:
What date is this meant to be?

CAST('1972-01-00' As Date)

It looks like either the day or the month is 00, which is not valid.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kyle AbrahamsSenior .Net DeveloperCommented:
INSERT INTO album (id, title, artist, label, released) VALUES (11,'Hendrix in the West','Jimi Hendrix','Polydor',CAST('1972-01-00' As DateTIME))
0
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
<do not accept this comment as the answer>

Maybe Jimi Hendrix was on something that day..
0
Shaun KlineLead Software EngineerCommented:
You have an invalid date. You need to include a day...i.e. 1972-01-01
0
Sandra SmithRetiredAuthor Commented:
Yes, that was it.  I did not even notice the date.  This is an upload script for a lession I am taking.  Thank you! I know I would never have gotten to that.  Works perfectly now.

Sandra
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.