Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
in my database i have column name date as datatype date.
i am inserting into date using getdate()
in my database it shows only date inserted but when i display my database on gridview it shows date with time eg: 03-02-2015 00:00:00
i don't want that time 00:00:00
how to eliminate this or i am inserting wrong in database?
Posted
Comments
PIEBALDconsult 6-Mar-15 0:10am    
That's simply a formatting issue in the gridview.
[no name] 6-Mar-15 1:01am    
Use my below code.it's display 03-02-2015 in gridview.if you wanted to change other format u can ref: http://www.w3schools.com/sql/func_convert.asp
King Fisher 6-Mar-15 1:44am    
Your Question is Solved here So could you please remove this Question or accept any answer to remove this Queue.
[no name] 6-Mar-15 3:29am    
Yes Mr King Fisher :)
King Fisher 6-Mar-15 23:51pm    
:)

 
Share this answer
 
v2

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