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
 CHANGING THE DATE FORMAT

Author  Topic 

tvspsekhar
Starting Member

20 Posts

Posted - 2010-03-27 : 06:34:30
pLEASE HELP IN RETRIVING THE CASTING COLUMN IN MM-DD-YY FORMAT WITHOUT THE TIME AS SHOWN BELOW. uSING THE DATETIME DATA TYPE FOR THE cASTING COLUMN, THE OUTPUT IS COMING LIKE THIS.

select * from progress

PRESENT OUTPUT FOR THE ABOVE QUERY IS :

LOCNO TYPE CASTING
1/0 DRY 2009-03-23 00:00:00.000
2/0 WET 2009-05-22 00:00:00.000

tvspsekhar

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-03-27 : 06:52:51
format it in your front end application

or check out the CAST & CONVERT in the BOL


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

haroon2k9
Constraint Violating Yak Guru

328 Posts

Posted - 2010-03-27 : 06:54:45
select DATEADD(dd,datediff(dd,0,getdate()),0)
Go to Top of Page
   

- Advertisement -