Link to home
Start Free TrialLog in
Avatar of dotnet0824
dotnet0824

asked on

SQL server DateTime

I have a field (Week_Start_Date) of DataType DateTime (SQL SERVER 2000)
I pass a string from my GUI and in the stored procedure i convert it to MM/DD/YY Format

SELECT @WEEKSTARTDT = CONVERT(DATETIME,@WEEKSTARTDATE,101)  
after the insertion  I get  the value of date along with time "2/8/2007 12:00:00 AM"
I dont want time to be there in the column.

What is that to be done. can it be shown.
Avatar of D B
D B
Flag of United States of America image

You'll need to convert it back into a string in your SELECT query:
CONVERT(CHAR(10), Week_Start_Date, 101) AS Week_Start_Date
Avatar of dotnet0824
dotnet0824

ASKER

does it mean that you cant insert just the date excluding the time.
ASKER CERTIFIED SOLUTION
Avatar of D B
D B
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That is what it means.
Thanks a lot . i tried it out . works great though.