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
 Development Tools
 ASP.NET
 Date Time Problem

Author  Topic 

NitinSL
Starting Member

2 Posts

Posted - 2005-01-15 : 22:58:05
I have a stored procedure which selects the date from the database and displays it in a datagrid.But the date that gets displayed is in the format dd/mm/yyyy hh:mm:ss.I want only the date part to be displayed without the time and wish to do the same during insertion too.How do i do that? can anyone help pls.

nr
SQLTeam MVY

12543 Posts

Posted - 2005-01-16 : 08:37:30
Have a look at convert in bol
for the insert
convert(varchar(8),dte,112)

for the output
convert(varchar(10),dte,103)




==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -