How to break a Date field into Year, month, week,day?(For example: I have a field INVOICE_DATE. Now i want to break it as Year, month..... i.e. in time dimension.) DO i need to have some changes in Universe?

Questions by sameerbhave

Showing Answers 1 - 5 of 5 Answers

Create objects in your universe with date functions.

Let's say your DB is Oracle. In your "Select" statement of new object called year, try

to_char(INVOICE_DATE, 'YYYY')  similarly for month create object called month & repeat process, simply replace'YYYY' with 'MM' of 'MMM' in the select statement. & so on.


Cheers,

Pat.

  Was this answer useful?  Yes

Lanka Madhav

  • Sep 26th, 2006
 

Hi

There is another way if you need only year Qtr and Month.

Right click the Date Object, go to Properties tab, There is a button Automatic Time Hierarchy. Click that and automatically you will get 3 objects below the object selected.

Note: i am not sure of higher versions since i am still working on 5.1.6

Thanks

Lanka

  Was this answer useful?  Yes

Hi,

Just you have create Variables like year, month, week and day base your objects so that you can use these variable and you can do what your.


Regards,

Sreenivas.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions