Convert date string to datetime

I have a date and time field I need to convert to true date time field.

This works but is not recognized at a datetime field with I apply other formulas to it for filtering, such as previous month data, etc...

atsdate + ' ' + atstime AS AtScene

returns this value:

2009-10-30 21:15:00

Still a string, not datetime

I am using SQL 2005 and SSRS 2008r2

Thanks in advance
srodgers45Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

dsackerContract ERP Admin/ConsultantCommented:
Try this:
CONVERT(datetime, atsdate + ' ' + atstime) AS AtScene

Open in new window

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
dsackerContract ERP Admin/ConsultantCommented:
Please keep in mind that if either the atsdate or atstime do not combine into a valid datetime, SQL Server will let you know about it with an error message that it could not convert an invalid date/time string.
srodgers45Author Commented:
Thank you for the assistance
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 2005

From novice to tech pro — start learning today.