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
 Select Statement with dates

Author  Topic 

jerry25
Starting Member

1 Post

Posted - 2008-02-06 : 10:46:48
right now I am able to retrieve the month and year from a field by month(TS_Date), Year(TS_Date), my question is can I put both results as one so output can say Date 2 2008 instead of two columns with month 2 year 2008.
any help would be appreciated

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-02-06 : 10:51:37
[code]SELECT CONVERT(CHAR(7), GETDATE(), 120),
CONVERT(CHAR(6), GETDATE(), 112),
CONVERT(CHAR(7), GETDATE(), 102),
CONVERT(CHAR(7), GETDATE(), 111)[/code]

E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-07 : 07:54:16
And as usual, if you want to show data in front end application, do formation there

Madhivanan

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

- Advertisement -