Date Format problem in a JTable, help plzzz !!!
Hi,
i have a JTable which contains multiple date columns, and more particulary, Timestamp columns.
I mean this format : yyyy-mm-dd hh:mm:ss.fffffffff
I only need hh:mm:ss informations for my JTable.
The problem is when i retrieve the datas in the JTable (which has a bean Select for model), the date column has this format : yyyy-mm-dd (only the date), and the time is not present !
What must i do to have only a part of the timestamp data in the column ??
Thanks in advance
Steve
If you want to format data in any way other than the default in a JTable, you need a table cell renderer. Sun's tutorial on how to use JTables explains them.
Similar Messages
-
Date Format problem...
Hi users,
Forte version : 2.e.2 and ForteWebSDK
Datacase : Oracle
We have a problem with a simple HTML text field which acccepts
a date. When we try to update the record with some date, the following
exception occurs:
24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
project Rap
tServices, class RaptSqlMethods, method updateActivity, methodId 104,
line 51, e
rror from database is:
ORA-01830: date format picture ends before converting entire input
string
The Oracle manual says that the above exception occurs when there are
some extra characters on that field, which is not the case. In fact,
we raise our own exception for the cases like : o1-Apr-1997,
01-apr-97 etc. The correct format is 01-apr-1998.
Same date soemtimes is added to the database successfully. Waht I mean
to say that the exception deos not occur consistently.
We just conevert the String taken from the HTML field into a Forte
DateTimeData Object and send it to database. May be, the conversion
part is causing the problem. But, once again the problem is not
consistent.
Any ideas in this will be appreciated.
Thanx in advance
-Rajeev Talwar
Get Your Private, Free Email at http://www.hotmail.com
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>We had the same problem when our application first went live. The
default date format for our Oracle database is 'dd-mmm-yy' without the
time component. The default format for datatype DateTimeData is
'dd-mmm-yyyy hh:mm:ss'. Since we did not want to change the default date
format for the Database, we included in our service partitions an Alter
Session statement to change the NLS_Date_format attribute in Oracle to
conform to the Forte DateTimeData format. It worked.
Kam Chow
Mazda Australia
-----Original Message-----
From: Gary F Giger [mailto:[email protected]]
Sent: Thursday, June 25, 1998 4:11 AM
To: Rajeev Talwar
Cc: [email protected]
Subject: Re: Date Format problem...
I was having the same problem a few weeks back when I would
read/write
dates to Oracle. I was using objects of type DateTimeData and I would
occasionally get errors like you said you were. I found discovered my
problem. Sometimes I would process a null date and would get an error.
So to
resolve this issue, I simply changes my objects of type DateTimeData to
type
DateTimeNullable. This enabled my Forte Application to handle regular
dates
as well as null dates. I have not gotten any oracle errors since then
with
regards to dates. Hope this helps.
Rajeev Talwar wrote:
Hi users,
Forte version : 2.e.2 and ForteWebSDK
Datacase : Oracle
We have a problem with a simple HTML text field which acccepts
a date. When we try to update the record with some date, the following
exception occurs:
24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
project Rap
tServices, class RaptSqlMethods, method updateActivity, methodId 104,
line 51, e
rror from database is:
ORA-01830: date format picture ends before converting entire input
string
The Oracle manual says that the above exception occurs when there are
some extra characters on that field, which is not the case. In fact,
we raise our own exception for the cases like : o1-Apr-1997,
01-apr-97 etc. The correct format is 01-apr-1998.
Same date soemtimes is added to the database successfully. Waht I mean
to say that the exception deos not occur consistently.
We just conevert the String taken from the HTML field into a Forte
DateTimeData Object and send it to database. May be, the conversion
part is causing the problem. But, once again the problem is not
consistent.
Any ideas in this will be appreciated.
Thanx in advance
-Rajeev Talwar
Get Your Private, Free Email at http://www.hotmail.com
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
Gary Giger
Raytheon Systems Company
300 Science Park Road
State College, PA. 16804
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
This message has successfully passed virus checking.
Mazda Australia takes every precaution to ensure email messages are virus free. For complete protection, you should virus test this message.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
Date Format Problem in Custom Report
Dear all ,
I am generating SQL statement for the report , i am passing (param_date from ) and (param_date to) to get data from SITs , and there is tow segments in the SITs : (SIT_date from ) and (SIT_date to) also ,, getting the data from the SITs by comparing the dates for the SIT and the parameters ,,, i am facing problem in the date format , ,, could any one please help me what is the format that i can compare the between dates in the SIT and the Parameters ???
Best Regards
Edited by: user6781803 on Jan 3, 2010 7:28 AM>
... i am facing problem in the date format ...
>
What is the problem ? Pl also post full versions of your OS and EBS.
HTH
Srini -
Hello All
Can anyone help me to solve this data format problem? On the top of my program, I have declare the two variables "purchasePrice" and "purchaseAmount" as double. I dont know why, the compiler still think I didnt initialize this two variables? I have printed the error message below the code.
Thanks for your help : )
Jen
=============================================================================
double purchasePrice, purchaseAmount, GPS, total_gain, amount;
//Find the purchase stock price
rs = stmt.executeQuery("SELECT Price FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
while (rs.next()){
purchasePrice = rs.getDouble("Price");
//Calculate the amount of Gain Per Share
GPS = intask - purchasePrice;
//Find the purchase stock amount
rs = stmt.executeQuery("SELECT Amount FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
while (rs.next()){
purchaseAmount = rs.getDouble("Amount");
//Calculate the amount of Total Gain
total_gain = amount - purchaseAmount;
=============================================================================
Error message:
variable purchasePrice might not have been initialized
[javac] GPS = intask - purchasePrice;
[javac] ^
variable purchaseAmount might not have been initialized
[javac] total_gain = amount - purchaseAmount;
[javac] ^
[javac] 2 errorsInstance and class variables are automatically initialized to their default values if they are not initialized explicitly, but local variables are not. They have to be initialized explicitly before they can be referenced.
In your code:
while (rs.next()){
purchasePrice = rs.getDouble("Price");
...purchasePrice is initialized only if rs.next() returns true. purchaseAmount has the same problem. To avoid this problem, you could declare them by:
double purchasePrice = 0;
double purchaseAmount = 0; -
Help : Simple Date Formats Problem in JDev11 [TP4] ?
Hi ;
I use ADF/JSF in JDeveloper 11 [TP4].
in JSF Page
what can I do to enter Date format mask dd-mm-yyyy hh:mi:ss
to Return my Date Format mask like
mi-mm-yyyy meaning minute-month-year
in another column ?
and I know The format mask is defined in a File called formatinfo.xml .
Thanks & Regards
ForakoraHi,
if it is for display then you don't need to change it in the model but can link the output text component to a managed bean that gets the stored date value to then change it to the format you prefer. This however may not be suitable if the date should be updated from that column -
XML Publisher to Excel Report : Date format problem
Hi,
I am trying to create an Excel report with XML Publisher. I have an issue with the Date Fomatting.
In the XML template, I have set the "Date" column in date format. But the excel output report "Date" column returns as "General text" (string) and it is sorted as text, not as date.
Can anyone please help me out?
Thanks!!!Hi,
Did this post solve your problem? I have the same issue that I need to solve.
I have an xsl-fo template with dates in it.
The dates are in english.
My excel is setup to use danish.
When I export to excel it knows the month jan, feb, mar, apr, ... which are the same in danish and english.
But months where it differs like may (danish maj) the cell is a general text instead of date.
Is there anyway you can set/transform the date in the xsl-fo template so it does not care about the language in excel?
Thank you in advance.
BR Kenneth -
Quicken 2007 date format problem in Mavericks
Objective: Get date format in dd/mm/yyyy format in Quicken 2007 (Lion compatible version).
Current OS: Mavericks 10.9.4
Hardware: Retina MacBook Pro & iMac 27" 3.2Ghz
Problem:
On my rMBP with Mavericks 10.9.4, I’m able to get Quicken 2007 data in dd/mm/yyyy format, as desired.
On my new iMac (late 2013) with 10.9.4, Quicken recognises the System date formats dd/mm/yyyy (setting up a new register shows System date format) but the registers and data are all in m/d/yy.
Quicken prefs are set to Canadian, so date formats should automatically be in dd/mm/yyyy, but aren't.
The Quicken data file is identical on both Macs. The original file goes back to 1991, and has been through all Mac OS iterations since then.
Pre-Lion, I remember that the workaround was to set the Language & Region to something (English / US, don’t remember which) and then change date formats. Anyway, the dd/mm/yyyy stuck, through Lion and Mavericks on my rMBP, but is causing a problem in the iMac.
My guess is that Quicken is unable to / blocked out from accessing System date formats in Mavericks 10.9.4.
Wondering if there’s some way to make Quicken access the Mavericks System date format, and stick to it?
Possible approach: If some expert in these forums knows how Mavericks works under the hood, how it allows other apps access to System Prefs like date formats etc., perhaps a script or Terminal command could force Quicken 2007 to recognise and accept date formats from System Prefs (Language & Regional settings).
I'd really appreciate the help; needless to say, the Quicken data is vital to my work.Hi Marlon,
The OS Local definitions. Different countries have different date formats for their location. Check the date format of the OS CultureInfo settings.
Regards,
Vítor Vieira -
CLIENT_OLE2 date formatting problem while reading from Excel
I have installed webutil package and tested that everything works by running webutil_demo as well as WU_TEST_106 form. Then I had implemented reading from Excel sp. sheet using Oracle note 813535.1 (This note has OLE2 code sample on how to read an Excel file). Everything fine till now. The problem started when I have a date fiield to read from Excel. The field where the value is going to has format mask of 'DD-MM-RRRR'. When the date is displayed in the form, it shows '01-AUG-0009' instead of '01-AUG-2009'. I tried changing the date format to different formats in Excel but no go. I found one blog which stated that treat the date as number and use e.g. "cell_date_value:=to_date('01/01/1900','DD/MM/YYYY')+client_OLE2.get_num_property(cel,,'Value')+2" but it too did not change the display. Then I tried debugging and stepping through the code..the only thing I noticed that OLE2 function displayed the date with 2 digit year as 09 and when the code completed execution, the date went back to '01-AUG-0009'. Casting with 4 digit year at every step in the code is not helping to change final date display correctly. Any idea?!!!
Hi,
While reading the date column from excel, try using
m_col_val := OLE2.get_char_property(Workcell,'Text');
Instead of
m_col_val := OLE2.get_char_property(Workcell,'Value');
I think you problem will be solved...
hello...i meant client_OLE2
Regards
Dora
Edited by: Dora on Sep 16, 2009 11:05 AM -
Hi experts!
I ve created a CUF with "DATS" format on CI_BBP_ITEM structure.
My problem is that CUF is displaying in ITS with YYYYMMDD format.
How can I get an ITS display depending of user date format attributes?
(ex : DD.MM.YYYY)
Thanks a lot for your help.
P.Hi Pierre,
For the CUF field create a new domain in SE11 and set the conversion routine for that domain. Choose a conversion routine that converts it depending on the user date format attribute.
Then create the cuf field from this domain and add it to the CI_BBP_ITEM structure.
Or you can go to the transaction SU3 for that particular user. Go to Defaults Tab and change the date format to DD.MM.YY. Save the changes. Try to login again and check the web whether the date is diaplayed in DD.MM.YY format.
Hope this helps.
Thanks,
Pradeep. -
Data format problem with Write to Spreedsheet File
I have a problem with the data format with Write to spredsheet file.
I have an N*3 array, where the 3 elements in each row should has different length. When I used Write to spreedsheet file,
it can only save the three data in one format. How can I save them in the format of "%0.8f %0.3f %0.2f"?
Thanks for your help.Hi powerplay,
another solution may be to convert column-wise using "number to fractional string", then interleaving resulting arrays and again using "array to spreadsheet string" (with "space" as separator).
Many ways lead to Rome
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
My data set has monthly records with the date defined as a
character with format '2007-02'. These values display correctly in
graphs in my ColdFusion MX application when my local computer is
acting as the host. However, when I move my application to our
external host, the dates change to format {ts '2007-02-01
00:00:00'}. This change makes the graph hard to read. I'm at a loss
as to where I should be looking to fix this problem. Can anyone
help?
Thanks in advance.Hi,
In the chart query, choose Advanced Query Mode.
<!--- Set the locale of the hosting server --->
<cfset locale = SetLocale("English (UK)")>
<!--- Query to get the required data --->
<cfquery name="qData" datasource="yourDSN">
select theDateField, theValueField
from tblName
order by theDateField
</cfquery>
<!--- Create a query object containing the date field you
want to display e.g. --->
<cfset myQry = QueryNew("mydate,
myvalue","varchar,decimal")>
<!--- Loop through your recordset --->
<cfloop query="qData">
<!--- Populate myQry --->
<cfset numrow = QueryAddRow(myQry,1)>
<cfset tmp =
QuerySetCell(myQry,"mydate",lsdateformat(qData.theDateField,"yyyy-mm"))>
<cfset tmp =
QuerySetCell(myQry,"myvalue",qData.theValueField)>
</cfloop>
Then, in your Label Column, choose mydate, and in your Value
Column, choose myvalue.
Hope this helps.
Regards,
Yogesh -
Date format problem in web dynpro java
Currently, the date format that gets displayed in our webdynpro java application is MMDDYYYY...i am assuming this is because the web dynpro application has language resource set to en_US as its Current locale in the web dynpro deployed content section. Howver i want it to display as DDMMYYYY. I have changed the default properties in visual admin for web dynpro from en to en_GB however this has no impact what so ever as the current locale is always set to en_US even after the change so am wondering this property is hidden some where else. Now the web dynpro i am talking about is a adobe portal application. Could you give me any pointers as to where else i can look for or how i can change the current locale properly ??
Regards
KalThe date format in the Web Dynpro Java Application depends upon locale. At runtime WDJ will do the following process to get the current locale for the date format to be determined.
1. First the WDJ Application will check for the locale set for the user in UME.
2. If there is no default locale in UME, then the it will check for the locale in the in the browser which in most cases by default is en-us.
3. If not, then it will check for the sap.systemLocale in the Propertysheet default of Visual Admin
4. If there no locale specified in Visual Admin, itu2019s taken from the WAS JVM
Please check the below SAP Note
http://help.sap.com/saphelp_nw04/helpdata/en/a0/58db515b95b64181ef0552dc1f5c50/frameset.htm
Regards,
Chandran S -
Date format problem in webdynpro java
Currently, the date format that gets displayed in our webdynpro java application is MMDDYYYY...i am assuming this is because the web dynpro application has language resource set to en_US as its Current locale in the web dynpro deployed content section. Howver i want it to display as DDMMYYYY. I have changed the default properties in visual admin for web dynpro from en to en_GB however this has no impact what so ever as the current locale is always set to en_US even after the change so am wondering this property is hidden some where else. Now the web dynpro i am talking about is a adobe portal application. Could you give me any pointers as to where else i can look for or how i can change the current locale properly ??
Regards
KalyanHi.
Also this link could help you.
http://help.sap.com/saphelp_nw04s/helpdata/en/18/f3674039c6c549e10000000a1550b0/content.htm
In special the table showing the order the locale is set in the web dynrpo application.
Also it is shown in the last pages of this document, [Web Dynpro for Experts|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/58a7e390-0201-0010-abb1-8eec7eb7a2ec?quicklink=events&overridelayout=true].
And finally you may use the sap.locale request parameter, how it's defined [here|http://help.sap.com/saphelp_nw04/helpdata/en/f4/651741f163f023e10000000a155106/frameset.htm]. You must add ?sap-locale=en_GB to url.
Manuel Loayza. -
Date format Problem in forms&reports Services 10g
Hi Dears,
I Faced a problem during running reports ( i am using forms& Reports Services 10g), when i pass the parameters via parameter form to the report (built in forms10g Rel 2.0) its appearing in arabic like (25-يناير-2010) as my Date Formate is (DD-YYYY-MON) and NLS_LANG parameter is defined as Arabic_Saudi arabia.AR8MSWIN1256 so as a result report is not running due to unknown Date formate, how can i change the Same Date format (DD-YYYY-MON) to appear in english like (25-2010-JAN)
ThanksYou could specify the parameter as type VARCHAR2, explicitly cast it (maybe to DD.MM.YYYY) when you pass it from forms and cast it back in your query, like TO_DATE(:P_PARAM, 'DD.MM.YYYY')
-
Date Format problem in ABAP Proxy
Hi All,
We have a Inbound ABAP proxy which recieves data from XI.
We use a date field in that which is defined as DATS datatype.
When we trigger the interface from XI with date in format YYYYMMDD, we are getting an exception.
when the date is sent in format YYYY-MM-DD, the interface is run successfuly.
when we test the interface in SPROXY transaction the date is displayed in YYYY-MM-DD format.
does it have anything to do with the defenition of the date format in XI?
I want to know whether DATS format in XI is different from ABAP?
should the date that is sent from XI be in YYYY-MM-DD format all the time.
Kindly suggest a solution for the date problem when it is passed from XI to ABAP proxyHi Uday,
Check the pattern used in XI/PI for the date definition.
If it's set to:
pattern="[0-9]-[0-9]-[0-9]"
Then it will enforce the pattern. You could try changing the pattern in XI to exclude the hyphen then you have a normal DATS format.
Regards, Trevor
Maybe you are looking for
-
I'm sorry if I am not using the correct language to describe what I am hoping to do. I would like to take a photo image and "colorize" it similar to the image seen here: Example Here Thanks for the assist!
-
When I first downloaded Firefox there was a tool bar at top of screen with print, yahoo and other items. Now it is gone. My question is this--how can I get it back?
-
Hi Gurus, We have few vendors created in RU (Russian Language ) language . When we try to search the vendor by name in XK03, system is unable to search the vendor. Is there any language installation required to resolve this issue. Please advise.
-
OLAP DML program 10g Help!!
I have a OLAP DML program that I am invoking as follows call pmtdim_user_sec(_aw 'MG_OU' 'OPERATING_UNIT') The intent is to use the OPERATING_UNIT or parameter in 3rd place as a condition for cursor in the program. e.g. below for the sql for cursor.
-
Hi, I enter non stock item in Bom with Item category ' N', but I dont want Purchase requisition to get craeted. Setting in OPL8 for field Reservation/Purch.Req. can be set as 1 but will it effect reservations for other stock materials i,e. item categ