Click here to Skip to main content
15,896,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.. i hav used date of birth with datatype as datetime.. and in design i am inputting textbox using ajax calendar extender.. Now after inserting to database i am getting the output as 2012-07-09 00:00:00.000.. I needed help in removal of time from this column.. please provide the solution.

Regards
sarthi
Posted
Updated 7-Dec-12 18:21pm
v2

Why Dont You Convert your DateTime like
select CONVERT(VARCHAR(8),  current_timestamp, 5) AS TodayDate

Place your DateOf Birth Field in place of current_timestamp
 
Share this answer
 
Comments
Member 7767311 8-Dec-12 0:44am    
hi my column is dob datetime.. how to use ur query
select CONVERT(VARCHAR(8), current_timestamp, 5) AS TodayDate..

i m using ur query as select CONVERT(VARCHAR(8), dob, 5) AS TodayDate.. i m getting invalid column error
Karwa_Vivek 8-Dec-12 0:49am    
use like this
select CONVERT(VARCHAR(8), dob, 5) AS BirthDate from tablename

add the Tablename also .the name of your table containg the dob field
Make date of birth's datatype as Date instead of DateTime...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900