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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Date Format

Author  Topic 

sqldba20
Posting Yak Master

183 Posts

Posted - 2010-09-24 : 12:12:22
Folks:

I want the date to be in this format:

dd/mm

09/24
09/25

I am using this but I get a error: Any help is appreciated.

select datepart(mm,getdate()) + '/' + datepart(dd,getdate())



Thanks !

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2010-09-24 : 12:17:18
[code]select convert(varchar(5),getdate(),101)[/code]

CODO ERGO SUM
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-09-28 : 11:30:52
Also note that if you use front end application, you should do formation there

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -