dbTalk Databases Forums  

Date Manipulation

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Date Manipulation in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
daveoram24@hotmail.com
 
Posts: n/a

Default Date Manipulation - 11-09-2006 , 11:37 AM






Hey all,

I have a table that contains a field called EffectiveDate which is
displayed in the yyyy-mm-dd format

I'm currently trying to make a seperate column in that same table(using
named calculation) to display a new date format:mm-yyyy
If possible i would also like to change the month number into the month
name using the MonthName function. That way it will look like January,
2005 or January-2005(right now it looks like 2005-01-22)

ps. Im running sql server 2005 and the tables im using have no create
statements as i have imported them into the data source view from our
server.

Thanks in advance.


Reply With Quote
  #2  
Old   
daveoram24@hotmail.com
 
Posts: n/a

Default Re: Date Manipulation - 11-09-2006 , 11:59 AM






Found the solution. Right under my nose in the help section too...

DATENAME(mm, EffectiveDate) + ' ,' +DATENAME(yyyy, EffectiveDate)

Cheers


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.