Date prompt in BO - business-objects

I have a webi report that accepts a date input.
I need to receive data from the user in the format "dd-Mmm-YYYY"; however the calendar control that BO presents to the user for date selection is always shown in M/DD/YYYY HH:MM:SS AM/PM.
Is there any way to control this behaviour?

Have you tried changing all the date fields in the Universe designer to the format that you want? You can either format them using SQL in the select statement box of the "Object Properties", or you can change the format of the field by right clicking and selecting "Object Format..."
I'm pretty sure that would affect the way the end user sees it.

you can set the date format (and all other format ) on the locatizion parametrs on the user setting for each user you have in cms , simply by the infoview preferences for each user .
home screen of central management -> preferences - > Preferred Viewing Locale + local time zone.
or
home screen of infoview -> preferences - > Preferred Viewing Locale + local time zone.
this will set also the date prompt format

There's another option.
On the BO server there's a javascript file that is used to create the calendar popup.
..\Tomcat55\webapps\AnalyticalReporting\viewers\cdz_adv\lib\calendar.js
Inside this file there's a function called CTFB_setFormatInfo which if passed a date format uses it ... if not there's seems to be a hard coded default of "MM/dd/yyyy hh:mm:ss a".
I'm pretty certain this is not updated by the other dozen ways to set the date format found in BO (user prefs, prn file, object properties ect).
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 consistent dd/mm/yyyy - without pesky mm/dd/yyyy randomly turning up when the preference isn't passed through.

Related

Changing the SSRS date picker format to DD/MM/YYYY

I have seen this issue posted a few times but there does not appear to be a solution for what I am seeing. I have a paginated SSRS report that requires a date input from the drop-down calendar. Upon entering, say, January 21st 2020, the UI is then displaying the date chosen as 1/21/2020, for example here. I need it to be 21/01/2020. Some points of note:
* all location settings for both the report server and the client browser are set to English (United Kingdom) and all date format settings are set to dd/mm/yyyy within the Windows settings on both the report server and client machine. All client browser language settings are English-UK in both IE and Chrome
* the variable is a DateTime data type
* this is a paginated SSRS report being displayed on a Power BI host server
* this is affecting all reports on this server
* the date field is not necessarily returned in the report, so converting the data is not applicable here.
* PBI version 15, SQL Server 2016
I have seen responses talking about expressing the field into the correct format, eg =CDate(Fields!BirthDate.Value) or =FormatDateTime(Fields!BirthDate.Value, DateFormat.ShortDate) however this does not appear to change anything (when it doesn't error).
I'm at a total loss as to where this Americanization of the date is coming from. Any thoughts?
Unfortunately, the report server's location settings and the user's browser's location settings don't (by default) do anything to the report formats because the report has its own Language property that is set by default to en-US. So unless you modify this property, you are always going to get US formats. You access this property on the report's Property panel.
Now you could set it to en-UK but a better solution is to set it to the user's internationali[s|z]ation setting by using =User!Language. Now you can use d as the cell Format property for the user's regional short date format.
Handy formats that use the user's regional formats are:
d = short date format
N2 = number with 2 decimal places
N0 = number with no decimal places
P0 = percent with no decimal places

How to set date/time format during edit

I set the date/time format and Input Mask in a field to display/input a 24 hour format Dec-28-2006 # 12:12 but when I edit the field with an existing date it reverts back to Dec/28/2006 12:12:00 PM.
Format is set to "mmm-dd-yyyy # hh:nn
Input Mask is set to ">L
I need to keep the field in this mode (Dec-28-2006 # 12:12) when editing an existing date/time. Is this possible?
That is by design, and it takes a lot to make it behave differently.
You may get some inspiration from my two articles and their demo applications:
Entering ISO formatted date with input mask and full validation in Microsoft Access
Entering 24-hour time with input mask and full validation in Microsoft Access
If you don't have an account, browse for the link: Read the full article.
Too much code to post here, but code is also on GitHub: VBA.DateEntry and VBA.TimeEntry.

"The value provided for the report parameter 'enddate' is not valid for its type. (rsReportParameterTypeMismatch)" in SSRS v8

I am getting the above error whenever I try to run the report. My region settings are set to date format "dd-MM-yyyy', the calendar control displays the date in that format as expected but when I run the report I get the above error. I have checked tregion settings, made sure the report language property is set to the correct regional language (in this case en-ZA) but the report still seems to expect the date in American format and only works when I manually enter the date in American format instead of selecting via the calendar control which returns it in regional format.
Anyone know why it would return this error when it seems that all the date formats are set the same both on the machine and within the report?

Changing the date format in Access 2010

I want to show the Purchase_Date in dd/mm/yy format . I already set the Format in form properties as dd/mm/yy
When i select a cell in database view it shows the date in dd/mm/yy but it still shows the date in mm/dd/yy otherwise
I need 05/02/14 to show as 02/05/14 at all times
This is by design. When the control gets focus, it will revert to the default format as to the settings in Windows.
A workaround can be to use three concatenated textboxes, but it requires some code to operate nicely.
You have to go to the Region and Language in the Control Panel and choose "English (Autralia)" as the format in the formats tab. Then change the short date format from the option below as you require. The format you want is available there.
Edit:
A better way to do it is to apply your own format. In the Format property of the properties of the Date/Time field, you can type in the format you want using placeholders and separators.
Hope this solves your problem.

Data Type Error when added Input Mask on Date Time Field

i have a date/time field called MyDate. Originally, its format is mm/dd/yyyy and there is no input mask. The Date Picker is also set. I then added input mask using Short date , changed the default input maks to (99-99-0000;;_) and change the format to mm-dd-yyyy. However, when i switch to DataSheet view , all my dates are changed from mm/dd/yyyy to mm-dd-yyyy (which is the correct behaviour right? ) and when I tried to enter a new date or modify existing date, it says "The value you entered does not match Date/Time data type in this column". Plus, the DatePicker is missing. How can I resolve this. thank you
The date time picker is not available if an input mask is applied to a field: http://office.microsoft.com/en-us/access-help/add-and-customize-date-and-time-formats-HA010078108.aspx#_Toc272229486
Regarding the error, have you considered using your regional settings in the control panel, which sets the defaukt date display for all (most?) applications?
Dates in Access are stored as numbers, so you can format them however you like, but I suspect the input mask may need to match the regional settings, although I am not certain.