Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Date only Parameter

Author  Topic 

bonaboard
Starting Member

7 Posts

Posted - 2009-12-18 : 12:07:23
I have created a stored procedure that has a datetime parameter. In the database it defaults the datetime to 12/18/2009 00:00:00 which is alright until I connect it to Crystal Reports. It is invalid in Crystal.

Is there a way I can strip my parameter to be date only so Crystal Reports will only look for the 12/18/2009?

This is my current parameter
@DateofBirth datetime

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-12-18 : 12:21:04
select convert(varchar(10),@DateofBirth ,101)
Go to Top of Page

bonaboard
Starting Member

7 Posts

Posted - 2009-12-18 : 13:58:35
Thank you for the reply.
Where would that go in my code?

If I change the syntax where I declare my variable it does not like it.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-18 : 14:02:52
You haven't posted your code, so we can't tell you where to put it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -