BusinessObjects Board

How to populate the month/year object in the designer

Hi Everyone,

I would like to know how to populate the month/year object. So that I can provide predefined prompt to the user on month/year.

is there any function to populate month/year object in the designer? Pls let me know, Thanks much

Thanks,
Sai


Sai7 (BOB member since 2009-08-26)

Somebody please reply to the above post.


Sai7 (BOB member since 2009-08-26)

Hi Sai,

You can have the list of values hardcoded in your @prompt function.


S_Shetty (BOB member since 2010-07-15)

Please do not bump your post until at least one business day has passed.


Nick Daniels :uk: (BOB member since 2002-08-15)

This depends on the database that you use as well as on the format of the month/year object - whether it should be 2010-09 or Sep-2010 or 2010 September, or …

So you need to let us know more details.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Sure, Thanks…


Sai7 (BOB member since 2009-08-26)

Marek,

We are using Teradata and format for the month/year could be anything, that doesn’t matter. Please let me know your thoughts.

Thanks,
Sai


Sai7 (BOB member since 2009-08-26)

Hi,

I have not experience with Teradata.

Maybe these date and time functions for Teradata can help?

Search using google how to format a date in Teradata.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Hi Mareck,

I am afraid I was not able to do it. We have one expiration date in the table. Can you or any one please tell me, how could we pull the month and year from the existing date? I need to create one object with month/year . so that we can give prompt to the user on the month/year. we are using the Teradata.

Please let me know if anyone could help me.

Thanks,
sai


Sai7 (BOB member since 2009-08-26)

The EXTRACT() function is used like the TO_CHAR() function in Oracle, meaning you can use it to extract (nice name, eh?) different components from a date. The syntax is something like:

extract (year from table.date)

Dave Rathbun :us: (BOB member since 2002-06-06)

Thank you Dave for reply. yes, I came across this function when I was going through the dynamic dates links provided by you under universe design section. But Your reply here helped me to understand how to use the extract function. I tried this one I can able to extract year and month seperatly.But is their anyway I could extract both together? Something like " Extract (year/month from table.date)".

EX: sel extract (year from table.date), extract (month from table.date) ;

The above syntax I am using to get year and month, is there anyway i can get both by using something like this “” Extract (year/month from table.date)".

Please reply… Thanks much in advance.

Thank you,
Sai


Sai7 (BOB member since 2009-08-26)

Extract them separately and then put them back together. I don’t remember the concatenation operator in Teradata, is it || or + or & or something else. :lol:

extract(year from table.date) + "-" + extract(month from table.date)

Dave Rathbun :us: (BOB member since 2002-06-06)

Thanks much Dave… :+1:


Sai7 (BOB member since 2009-08-26)

Why not just use:

(DATE-DAYOFMONTH(DATE))+1

and format the Object as ‘Mmmm YYYY’?

This posting might be of help regarding Teradata date functions: https://bobj-board.org/t/162166


anorak :uk: (BOB member since 2002-09-13)