EA1 - Cannot Change Date Format in SQL Results
In version 1.2, I used to go to Tools > Preferences > Database > NLS Paramters and change the date format there. The change would then be reflected in the SQL results for date columns.
When I try to do the same thing in 1.5 EA1, the date format is always the same, DD-MON-RR, no matter what I put in the date format setting under NLS Paramters.
Am I missing something?
Thanks.
Just a quick post to make sure that the bug you logged takes into account all NLS parameters :), as this does not concern only dates but also timestamp formats, decimal and group separators as well, and probably all of the NLS parameters I assume.
Similar Messages
-
Cannot change date format in delimited output
Hi,
I am launching a series of Reports from a Forms environment in pdf format without any problem.
However, we're finding trouble when setting the format to excel (desformat=delimiteddata in set_report_object_property). Date fields which include hour and minute are being truncated ('18/05/2007 12:10:00' to '18/05/2007'). This is a highly undesirable behavior and we would like to fix it.
We have been following online help and found out that dateformatmask parameter is the key to achieve this. We have included it in the report launch string that is used inside the web.show_document built. This is the way it looks:
/rwservlet/getjobid2574?server=rep_cspas&mimetype=application/vnd.ms-excel&dateformatmask='DD/MM/RRRR HH24:MI:SS'
However, report date fields format keeps being wrong. Any clue about this?
Thanks and regards,
Fernando Gorostiza.Thanks, but that's a kind of solution I had already thought of but which I wanted to avoid. We have over 60 reports, and although I can make one developer change every date field inside each of them, I believe it's quite a big waste of time considering the existence of dateformatmask parameter.
Any other idea? -
Date formats for SQL statements used by recordset object
Hi,
Date formatting appears to be quite problematic for Business One. I did a forum search for date issues and I don't think I saw any of them with an "answered" status. I have an issue with formatting a date for the creation of an SQL statement that the DI sends to SQL Server 2005. I need to format a date so that the localization parameters don't matter for either the client machine or SQL Server's machine. We don't have a problem as long as our machines are localized as USA.
I have PL 22 and I have a form - ours - where I use the Today() function to fill a date field. So this is a date that is not entered by the user. The result of this function is consistent with the localization parameters on my machine. We have two other date fields on the form where the user must type in the date.
As a test, I changed my machine to the UK parameters. I then set up the language parameters of Business One for English(United Kingdom). I changed the date format specifications in Business One so that its format is dd/mm/yy. I then brought up the form and the field that is formatted by the above function arrived in the form's field as dd/mm/yy. I then typed in the two other dates in the same format and added the record to the database. The form's table is user-defined.
I dismissed the form then brought it back up loaded with the new record. The date that was entered by the function appeared in USA format (mm/dd/yy). The dates that were typed in appeared in the Business One format (dd/mm/yy). This of course is not consistent.
When I looked at what got into the database, the formats were the opposite. Weird! To make matters really confusing, I run an SQL statement within SQL Server Mgt Studio, and use the WHERE clause to filter on the date that was based on the function. It didnt matter what format I used for the WHERE clause, the record came up. Does anyone have any idea about how I can ensure that I always use the correct date format for SQL statements passed by Business One to SQL Server regardless of where in the world the application is being run?
Thanks,
MikeIan,
Here's what I'm concerned about: Im using the date in a WHERE clause.
Assume the date is Aug 3, 2007.
"SELECT * FROM Table WHERE StartDate > 8/3/2007"
OR
"SELECT * FROM Table WHERE StartDate > 3/8/2007"
If the client machine is set up as USA, the today function will provide the date as formatted in the first query. If the database server is setup as lets say the UK, I believe that SQL Server query parser will interpret the date as Mar 8, 2007.
If the client machine is set up as UK, the today function will provide the date as formatted in the second query. If the database server is setup as lets say USA, I believe that SQL Server query parser will also interpret the date as Mar 8, 2007.
In both cases it would be wrong.
I know I could use the DATEPART function to get the three parts and this will make the code indifferent to the localization specs of the client machine. I need to then be able to concatenate those date parts for the WHERE clause so that the localization specifications of the database server dont matter.
Thanks,
Mike -
Hi there !
Please, can anyone help me find out what is going on with date format in my SQL Statements ?
While in development, the date format in SQL statements were:
SELECT DATA_FIELD FROM TABLE WHERE DATE_COL = '10-DEC-2004'
And works fine.
After deploy to production server, we get ORACLE error: not a valid month
So we change the format to
SELECT DATA_FIELD FROM TABLE WHERE DATE_COL = '10/12/2004'
And it gets to works again.
Yesterday, the net administrator updated the JAVAC / JSDK run-time with Java update tool, and AGAIN we get ORACLE error: not a valid month
So we change the format AGAIN to
SELECT DATA_FIELD FROM TABLE WHERE DATE_COL = '10-DEZ-2004'
And it gets to works again.
What is going on ?
JAVAC running on Windows2003.
The application access the ORACLE DB directly through JDBC.
There is no APPLICATION SERVER, like TOMCAT.
The regedit (windows registry) ALWAYS was and are now :
NLS_DATE_FORMAT = DD-MON-YYYY
NLS_LANG = AMERICAN_AMERICA.WE8ISO8859P1
Versions:
DB Oracle 9.2.0.5.0
JavaC 1.4.2.05
Thanks.
JulianoSomewhere, I'm willing to wager your NLS_DATE_FORMAT was/ is being changed. This is a client-side setting. Are you sure that the setting is the same on every client machine.
This is one of the reasons that it is considered bad form to rely on implicit conversion. If you wrap your string literal in a TO_DATE, use the JDBC escape sequence {d }, or use a Date bind variable, you don't have this problem. The bind variable approach will also play much more nicely with your database's shared pool.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
I'm using Sql Developer vers. 1.1.2. for Oracle 8.1.7 and I can't change Data Format. Even if first I run "alter session set nls_date_format = 'DD/MM/YYYY';" and after I run "select data_field from table;" in the SQL Worksheet, it goes on reporting the field in format "MM/DD/YYYY HH:MI:SS". It seems to me as if the "alter session" doesn't work.
I've got a problem with decimal separator too. I mean when I run "select salary_field from table;" and the item is for example 2300,32 the report gets null column even if I've set Decimal Separator to "," from Tools>NSL Parameters>Decimal Separator.
I need help.
Thanks in advance
MarcoMarco,
It isn't really a great help, as you need to access 8.1.7, but the current version doesn't have this problem - it uses the current NLS_DATE_FORMAT setting to format the date, regardless of the NLS preferences.
I have vague memories (1.1.2 has largely faded from my memory) that when they first introduced the NLS preferences that they took precedence over the DB NLS settings (ie date formatted in SQL Developer based on NLS preferences).
On the decimal separator, I have other vague memories of problems if you didn't set both the Decimal and Group separator, although a quick search on the forum didn't highlight something that seemed the same as your problem. After logging on (ie with the NLS preferences as the DB NLS settings), what do you get if you the NLS_NUMERIC_CHARACTERS parameter in the NLS_SESSION_PARAMETERS view? This should have two characters - the first one being the decimal separator and the second being the group separator.
theFurryOne -
How to change date format in BR?
Hi all!
Does anybody know how to change date format in BR?
I created global variable with type DateAsNumber and usage type run-time promt and used it in BR
Then I launched a BR on the form and chose necessary date. Date stored in MM/DD/YYYY format, but I need DD/MM/YYYY.
I tried to change format through Planning but then I recieved uncorect result(for instance, I selected 4(April)/14/2009 but it was stored as 4/02/2010)Hi,
the date is always stored the same in Essbase. I think it's YYYYMMDD.
You can change the format you enter the date in webforms and business rules by changing your planning application settings (Preferences->Display Options).
Cheers. -
Change date format yyyy-MM-dd to MM/dd/yyyy
Hi,
How to change date format yyyy-MM-dd to MM/dd/yyyy
Thanksa_bean wrote:
Thanks guys,
String updated = original.replaceFirst("(\\d{4})-(\\d{2})-(\\d{2})","$2/$3/$1");
it workedIf, as you said in an earlier post (reply #4), you had the date as a java.util.Date object then this cannot have worked. Are you saying the date is stored as a String and not as a java.util.Date ? -
How to Change Date Format in Registry
how to change date format in registry so when u qeury the date column, it display in our specific format like 20-05-2005 instead of 20-may-05. i dont want to use to_char in query
thanksUnder HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME{X}
NLS_DATE_FORMAT = 'dd-mm-yyyy'
You could also change the database date format :
SQL> alter system set NLS_DATE_FORMAT = 'dd-mm-yyyy' scope=spfile;
and restart the DB. -
How to change data format from MM/DD/YYYY to DD/MM/YYYY
HI,
How can we change data format from MM/DD/YYYY to DD/MM/YYYY in Prompt and Report Level in obiee 11g.
Please help me ont this.
ThanksHi,
In Prompt:
Try using EVALUATE function.
Eg: Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'DD-MON-YYYY')
Report level:
Try this in the column formula-
Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'MM/DD/YYYY')
(or)
EVALUATE('TO_CHAR(%1,%2)' AS CHARACTER ( 30 ), "Dim- Date".Start Date, 'MON-YY')
http://108obiee.blogspot.in/2009/03/how-to-change-date-format-mask-in-date.html
http://obiee-bip.blogspot.in/2011/08/customizing-obiee-calendar-display.html
Some other methods.
Metdhod 1:
'Save System-Wide Column Formats' Option
Check this.
http://siebel-essentials.blogspot.com/2010/10/11-obiee-11g-tips-9-system-wide.html?m=1
Thanks
satya -
Change date format in reporting (query)
I need to change date format from dd.mm.yyyy to dd/mm/yyyy in reporting (query)
Hi Suresh,
Go to transaction su01d in that enter your user.
Now go to defaults and change the date format.
Ya but this format will be user specific, so if you want everyone to see that format you have to change it for all.
Regards
Mansi -
Update date format in SQL developer
I need to convert date format in SQL developer , it's varchar2 format now
The current format is yyyy/mm/dd-hh:mm:ss:sss and I need to convert it to yyyy-mm-dd hh:mm:ss CST
I don't really know SQL but did some research and found that I can use instr to find the string and replace it, however, no matter what I try,there is always something off :(
Could anyone here help me with it? thanks in advance.create table xo_custom_date_format (mydateAsChar varchar2(100));
table XO_CUSTOM_DATE_FORMAT created.
insert into xo_custom_date_format
values ('2012/03/23-09:52:24:123')
+1 rows inserted.+
select mydateasChar from xo_custom_date_format
mydateaschar
+2012/03/23-09:52:24:123+
select to_timestamp(mydateaschar, 'YYYY/MM/DD-HH24:MI:SS:FF3') mydateAsTimestamp from xo_custom_date_format
-- We must convert to timestamp data type, rather than date data type as you have fractions of seconds
mydateAsTimestamp
+23-MAR-12 09:52:24.123000000 --<-- This will probably appear differently, depending on your database NLS_ settings (i.e. what country you are in)+
select to_char( to_timestamp(mydateaschar, 'YYYY/MM/DD-HH24:MI:SS:FF3') , 'YYYY-MM-DD HH24:MM:SS')||' CST' as myDateReformatted
from xo_custom_date_format
mydateReformatted
+2012-03-23 09:03:24 CST+ -
How to change date format for prentation variable in Formula
Hi experts.._
I need to change date format for presentation variable in formula..
my dashbord date prompt format: mm/dd/yyyy(i have created one presentation variable for this prompt: pv_date)
now i need to show it as : month-dd-yyyy
Thanks in advance
Regards
FrndsHi Kishor...Thanks for reply...
But i need to change my precentation variable date formt...
i need to write one text like: 'Year to dd/month/yy' in one column formula..
So how can i achieve it.. -
How to change date format in alv report
hi ,
i wanna change date format which is in yyyy.mm.dd to mm/dd/yyyy in alv report.
plz advise.
thanks
sudheerHi sudheer,
There is no direst Fm fro that.
But u can follw the below way. it worked for me. kindly chk it.
[code]DATA: V_DATE_IN(10) TYPE C,
V_DATE_SAP TYPE SY-DATUM.
V_DATE_IN = '01.01.2005.'.
CONCATENATE V_DATE_IN+6(4) "<--for Year
V_DATE_IN+3(2) "<--for month
V_DATE_IN+0(2) "<--for Day
INTO V_DATE_SAP.
now V_DATE_SAP will have value like 20060101.
now use.
CONVERSION_EXIT_PDATE_OUTPUT Conversion Exit for Domain GBDAT: YYYYMMDD -> DD/MM/YYYY[/code]
regards
anver
<b><i>if hlped pls mark points</i></b> -
Change Date Format in MSDS report
SAP EHS expert:
I would like to change Date Format when printing MSDS in different languages. For example, print date in MM.DD.YYYY format when printing MSDS in English, but print date in YYYY. MM. DD format when printing MSDS in Chinese.The Generation Variant setting is MM.DD.YYYY because most of time we print that MSDS in English.
Does any one know how to do it?
Thanks
Tina Wuhi,
create a new generation variant for the Report template and select the date format that you want in the new GV. While printing the report template select the generation varient created for the required date format.
Ashish -
Changing date format in bw report
Hi,
Could anybody pls Explain How can I change date format in bw report from 19-03-2008 to 19 mar 2008.Is there any setting we need to do. Else do i need to write some ABAP code to get desired format.
Regards,
SarathHi Sarath,
I could have the routine enabled and its wrk for my DATS obj ...
else pls go through the following code
Check this example of how to get this format..
TABLES: T247.
DATA: V_DATE TYPE SYDATUM.
DATA: V_STRING(20).
V_DATE = SY-DATUM.
SELECT SINGLE * FROM T247
WHERE SPRAS = SY-LANGU
AND MNR = V_DATE+4(2).
IF SY-SUBRC = 0.
CONCATENATE V_DATE+6(2) '-' T247-KTX '-' V_DATE(4)
INTO V_STRING.
WRITE: / V_STRING.
ENDIF.
or make use of the routine make use of the FM
CONVERSION_EXIT_IDATE_OUTPUT
hope it helps you out...
regards,
pradeep
Assign points if useful.
Maybe you are looking for
-
How to browse data in a from which is connected to UDO
Hi all i've created a from using screen painter on 2005 version. i connected the form to a UDO object. i want to enable the form to navigate over the table which the UDO object is connected to by using the navigation buttons on the toolbar . How can
-
Value mapping replication - java cache
i used value mapping replication and successfully loaded values to the java cache (i can see the in the cache monitoring but not in the configuration). when i try to use a scenario with value mapping using the agencies and schemes which i loaded, th
-
Hi all, Is there a way I can reduce an interactive PDF file size. As per my understanding it can be done with ES2 PDF generator in AdminUI, but I am looking to do this in the process(work flow). Any suggestions? Many thanks, Tanmay
-
Macbook Pro, bracket keys, brush size
Using a French keyboard, how can one access the bracket keys on a Macbook Pro in order to change brush sizes. The usual shift-option-( to get the bracket keys does not work, at least for me. I'm on 10.5.4. Thanks.
-
Subtotaling on the fly in ABAP Web Dynpro Applications
I know that I can programmatically add totals and subtotals to a WD ABAP report, but is there anyway for the users to do it ad hoc? If not, does anyone know if this is coming in any future release of WD?