BusinessObjects Board

how to eliminate Time part in LOV

hi experts

colud any one solve this please

i have a date object which contains both date & time. how can i eliminate time part from LOV. so that the user can see only date value from list. my database is SQL SERVER.

dhani.


dhani (BOB member since 2007-05-21)

Dhani,

I don’t know about SQL Server, but here is the formula which works for Oracle.

=Substr([Date];1;Pos([Date];" ")-1)

Just change [Date] with your ‘UserResponse("…")’ , and you will get only Date.

Thanks


justdesi (BOB member since 2006-06-28)

Hi,

You can use convert function in sql server.

but you will get output only string value, but sort based on string like 1-Apr-2007, 1-Dec-2007, 1-Jan-2007.

is it ok
then you can use this.

you need proper order you should do some modification

you should convert date like 01,02,03 and month also same, year just 2007, concatenate. Now you will get 01 01 2007 next you should insert “-” in middel. Then you will get 01-01-2007. Now your lov have without time

i think this way only you can do it.

Try to use someother idea also.

if you slove it other then this way. Please inform me.

Mahudeswaran. K


mahudes :india: (BOB member since 2006-03-06)

Hi there,
I used this method and it worked for me before:

  1. Supposed you have the OriginalDate object (with time part)
  2. Create NewDate object as character type (To_char(OriginalDate))
  3. Edit LOV on new object : Select NewDate object for the data, but select OriginalDate object for the sort, this way it will sort correctly based on the date and not on the character string.

happymichelle (BOB member since 2007-07-11)

Hi

Thanks for all of your replies,

the problem here is in Infoview, in infoview when i am selecting a date from calender its showing selected date with time so in order to eliminate time there in calendar selection what i have to do

is it possible , with SDK or anything else

please

Once again Thanks for all of your inputs

Dhani.


dhani (BOB member since 2007-05-21)

Hi happy,

if you modified based on other object you cant get distinct value.
you will get all data from that table.

ex:
your char date is 1-jan-2007
if database have 100 data in this date (1-jan-2007) but different time then you will get this date in that lov 100 times.

is it true. if it is false then no problem we can use this. if that date is not distinct then it is a issue.

Mahudeswarn. K


mahudes :india: (BOB member since 2006-03-06)

You’re right, it won’t have distinct value. I recall now that I had to create a custom LOVs to select the distinct values…
As for the original question, I’m sorry I don’t have an answer for that. The date comes automatically with the time when you select from Calendar. If you want to display the value after it was selected (in the result of the report), then you can always format it, but I don’t know how to format it in the prompt.

Michelle


happymichelle (BOB member since 2007-07-11)

This is a question that has been asked many many times. There is a Designer FAQ that links to this topic. Please review it and see if any of the tips help you.


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

Hi Dave
sorry to say dave i know posting a same question in different forums is not good at all!

but this is entirly different requirement
the question i asked in the webi is related to the LOV date format but the need is change in the calendar it self not in the LOV. so i posted the question in the SDK section because i thought it is possible only by using SDK.

Thats why i posted here if anything seems to be wrong i am sorry for that…

i hope u got my point… its different questions.

anyways thanks for your input.

regards
dhani


dhani (BOB member since 2007-05-21)

I will re-open the other topic, but they do look the same to me. :slight_smile: Good luck with your project. 8)


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