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
 General SQL Server Forums
 New to SQL Server Programming
 simple question about date data type

Author  Topic 

ashishkukreja
Starting Member

16 Posts

Posted - 2007-08-25 : 05:46:18
I want to create a procedure where nextvisitdate is a cloumn for date
so when I passed variable @nextvisitdate then which data type I have touse with it.

CREATE PROCEDURE sp_salesman_nextvisitdate

@salesman varchar (50),
@nextvisitdate date (50)

As

Select * from Entry Form

WHERE

@salesman = salesman
AND
@nextvisitdate = nextvisitdate


GO


You Have to Loss Many Times to Win Single Time

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-25 : 06:44:34
DATETIME or SMALLDATETIME



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-08-25 : 07:55:49
If you use SQL Server, then as said, use DATETIME or SMALLDATETIME datatypes

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-08-25 : 10:39:08
You can get date only from the column with convert function.
Go to Top of Page
   

- Advertisement -