BusinessObjects Board

How to format a prompt with only the date dd/mm/yyyy?

Hi,

I would like to use the prompt with only the date (dd/mm/yyyy) and not the date/time (dd/mm/yyyy H.mm.ss). See attached prompt1.jpg.

The prompt has been defined in the universe.
The object Resolution Date, on which the prompt is based, is formatted as Date with the correct format.

Can someone help me?

Thanks,
Francesca
prompt1.JPG


framac75 (BOB member since 2009-06-18)

I would suggest a search with keyword ‘timestamp’. There are lot many topics in B :mrgreen: B, including this for a universe level change.


Jansi :india: (BOB member since 2008-05-12)

I did it since this morning and I also tried some changes but without success. :frowning:
Maybe you can suggest the correct topic.


framac75 (BOB member since 2009-06-18)

When I have this problem, I create a new dimension object in the BusinessObjects Universe.

If the field of DATE type is called for example EVENT_DATE, I create a dimension object so defined:

to_char(EVENT_DATE, ‘YYYY/MM/DD’)

In this way, the alphabetical sort gives you, in the meantime, the cronological sort: it’s convenient!!

If your dimension object is defined:

to_char(EVENT_DATE, ‘DD/MM/YYYY’), the alphabetical sort won’t give you the cronological sort:

08/03/2009
09/02/2009
10/01/2009

… are alphabetically sorted, but not cronologically sorted.

If you use to_char(EVENT_DATE, ‘YYYY/MM/DD’), you’ll have:

2009/01/10
2009/02/09
2009/03/08

which are alphabetically and cronologically sorted in the meantime.

Try!! :wink:


Christian Konrads :it: (BOB member since 2004-07-21)

The date format of the prompt is controlled by a prm file on your Busienss Objects server

Open your universe, parameters and test connection
Open details - locate PRM file being used
Go to Business Objects Server
Open PRM file using notepad
Locate line below and edit date to required format

{\d ‘yyyy-mm-dd HH:mm:ss’}

Re-start connection server

(This should be documented by someone with more time than me and put on a sticky)

Test your date prompt…


jemstar :ireland: (BOB member since 2006-03-30)

Hi,

I would like to maintain the Data type and don’t use a string.
I tried to edit the prm file as you suggested:

instead of:
‘dd-MM-yyyy HH:mm:ss’

I put:
‘dd-MM-yyyy’

Nothing is changed also after the server restarting. I noticed that the format used in the prompt is not ‘dd-MM-yyyy HH:mm:ss’ but ‘dd/MM/yyyy H.mm.ss’ so I guess there should be some other place where set it.

Any other idea?

Thanks,
Francesca


framac75 (BOB member since 2009-06-18)

Are you sure you edited the correct .prm file?

To check your changes - view the SQL on the query after you have run the query…


jemstar :ireland: (BOB member since 2006-03-30)

If it helps, I use:

table.datecolumn >= to_date(@Prompt(‘1) Start Date (dd/mm/yyyy):’,),‘DD/MM/YYYY’) AND
table.datecolumn <= to_date(concat(@Prompt(‘2) End Date (dd/mm/yyyy):’,),’ 23:59:59’),‘DD/MM/YYYY hh24/mi/ss’)

in some of my measures to grab events that occure between 2 dates entered at runtime. My dates are stored dd/mm/yyyy HH:mm:ss in the (oracle 10g) database, but the user just has to key dd/mm/yyyyy into the prompt. The date range grabbed includes everything on the first date up until 23:59:59 on the second date.

Debbie[/code]


Debbie :uk: (BOB member since 2005-03-01)

You should be trying to compare like with like:

Prompt response should be dd/MM/yyyy 00:00:00

Your universe date object should also have the time portion stripped out as well so that it in the format dd/MM/yyyy 00:00:00.
There are numerous posts here for removing the timestamp from an oracle date under the universe forum


jemstar :ireland: (BOB member since 2006-03-30)

Hi,

the prm file I changed is set in the connection: PRM : C:\Program Files\Business Objects\BusinessObjects Enterprise 11.5\win32_x86\dataAccess\connectionServer\oracle\oracle.prm

The SQL query is not changed, the where condition is:

WHERE
TRUNC(to_date(‘01011970’,‘ddmmyyyy’) + ARCH_CASE.RESOLUTION_TIME_T* 1/24/60/60)
BETWEEN @prompt(‘Date début’,‘D’,‘ARCHIVED CASES\Resolution Date’,Mono,Free,Persistent,{‘01/03/2009’},User:-1)
AND @prompt(‘Date fin’,‘D’,‘ARCHIVED CASES\Resolution Date’,Mono,Free,Persistent,{‘01/04/2009’},User:-1)

What I notice is that the same report has been developed also with DESKI (same universe) and the prompt is shown correctly. I guess that is not an universe problem but a webi setting.

Thanks,
Francesca


framac75 (BOB member since 2009-06-18)

The way to check whether you have updated correct PRM is to open universe, go to parameters, test connection and click on details button and pan down to the prm line

Is ARCH_CASE.RESOLUTION_TIME_T* 1/24/60/60) putting the timestamp back onto your date field or is it adding 00:00:00?


jemstar :ireland: (BOB member since 2006-03-30)

yes, the PRM is correct. Moreover the old format specified in the PRM is not the one shown in the prompt (‘dd/MM/yyyy H.mm.ss’).

Running the query from TOAD the results are shown correctly (dd/MM/yyyy).

Francesca


framac75 (BOB member since 2009-06-18)