Date request to BO

I have a webi report that accepts date input. I need to get data from the user in the "dd-Mmm-YYYY" format; however, the calendar control that BO presents to the user for date selection is always displayed in M ​​/ DD / YYYY HH: MM: SS AM / PM.

Is there a way to control this behavior?

0


a source to share


3 answers


Have you tried changing all date fields in the Universe design to the format you want? You can format them using SQL in the Object Selector field in Object Properties, or change the format of the field by right-clicking and selecting Format Object ...



I'm sure it will affect how the end user sees it.

+1


a source


you can set the date format (and all other format) in the localization options for a custom parameter for each user you have in the cms just by using the infoview settings for each user.

central control main screen -> preferences -> Preferred locale view + local timezone. or main screen info -> preferences -> Preferred view of locale + local timezone.



this will also set the date prompt format

+1


a source


There is also another option.

The BO server has a javascript file that is used to create the calendar popup.

..\Tomcat55\webapps\AnalyticalReporting\viewers\cdz_adv\lib\calendar.js

      

Inside this file there is a function named CTFB_setFormatInfo

which, if passed in date format, uses it ... if not, then apparently there is a hardcoded default "MM / dd / yyyy hh: mm: ss a" ...

I'm pretty sure this hasn't been updated by the other dozen other ways to set the date format found in BO (custom prefs, prn file, ect object properties).

function CTFB_setFormatInfo(format,arrDays,arrMonth,AM,PM)
{
var o=this
o.arrMonthNames=arrMonth?arrMonth:_month
o.arrDayNames=arrDays?arrDays:_day
o.format=format?format:"MM/dd/yyyy hh:mm:ss a"
o.AM=AM?AM:_AM
o.PM=PM?PM:_PM
}

      

I just updated this file - and now I get sequential dd / mm / yyyy - without beefy mm / dd / yyyy randomly where no preference is passed.

+1


a source







All Articles