Date format during editing in JTabel
I try to set up the editing a date in a cell of a jtable. But the format of the displayed date turns into an unusable format:
2001-10-01 00:00:00.0
wenn i start the editing mode (double click).
Is there no way to set the format in editing-mode? Have i to write a new celleditor just for this?
I need: 01.10.2001
I tried:
Locale.setDefault(Locale.GERMANY);
JTextField tmpDateEditFormat = new JTextField();
tmpDateEditFormat.setLocale(Locale.GERMANY);
tmpDateEditFormat.setBackground(Color.GREEN);
table.setDefaultEditor(Date.class, new DefaultCellEditor(tmpDateEditFormat));Thanx for helping.
MagLight
I tried. But it ha no effect.
Locale.setDefault(Locale.GERMANY);
JFormattedTextField tmpDateEditFormat = new JFormattedTextField(new SimpleDateFormat("dd.MM.yyyy"));
tmpDateEditFormat.setLocale(Locale.GERMANY);
tmpDateEditFormat.setBackground(Color.GREEN);
table.setDefaultEditor(Date.class, new DefaultCellEditor(tmpDateEditFormat));
Similar Messages
-
ADF 10g Allow Multiple Date Formats During Data Entry
We would like the ability to allow users to enter a date in several different formats. When they tab from the date field (or click out), we would like a custom java method (which we can write) to execute which analyzes what they typed and formats the date as MM/dd/yyyy. Can we do this and how do we get it to execute BEFORE any other validators and/or converters? A simple example is this: the user enters a forward slash (/) into a date field, they tab out, and we populate the date field with the current date.
Any help and/or ideas is greatly appreciated.
Thanks,
TracyHi,
actually you will write your own converter and use this instead of the default converter. This is the way you do it. It also ensures that the timing between validation a conversion is fine
Frank -
How to show Append Changes previous value in text box during edit
Hi,
I am using multi text column with append mode, all feature of append mode is working fine,but when any other field has been changed on that time append text box take blank value.
when using same list with ssrs ,report shows the current data,but after approved by manager current item change in blank and current data come in history.
is any way to do ,if any body change the any item same data appear during edit time in same column.
Hasan Jamal Siddiqui(MCTS,MCPD,ITIL@V3),Sharepoint and EPM Consultant,TCS
|
| TwitterHi Hasan,
According to your description, my understanding is that the multi text column with append mode is not working fine in your SharePoint 2010.
For reproducing your scenario, I created a new custom list , turned on its version feature and added a multi text column with append mode. But it was working fine when I change the values of both the
multi text column and other columns.
For your issue, could you create a new list to verify the multi text column with append mode works correctly.
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Editable field in alv data format
i have a editable field on ALV which is of date format and i need when user enter a date the value will be updated in the database table .
note that i am using alv list and the field catalog is of date format dat 8
the update is not done pleaseee helppp urgentHi,
You need to use the USER_COMMAND in the ALV function module
{CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'GUI_STAT'
*i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
*it_special_groups = gd_tabgroup
*it_events = it_events
i_save = 'X'
*is_variant = z_template
TABLES
t_outtab = i_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
then you need to write the below FORM
* FORM USER_COMMAND *
* --> U_COMM *
* --> RS_SELFIELD *
FORM user_command USING u_comm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.}
Here in the Form, Write the UPDATE statment to update the database table
Regards
Sudheer -
How to set Date format and how to edit
Hi all,
I am supposed to select a date from calendar and put the date in a textfield in the format dd/mm/yyyy.
Getting date from the calendar and putting it in textfield is not a big problem.
Here I have to edit the date in the text field in such a way that clicking with a mouse on "dd" in the textfield dd part of the textfield should get selected and I should be able to edit date without affecting any other part in the textfield.Similarly clicking on the "mm" of text field,the mm part should get selected and i should be able to edit month without affecting other parts of the textfield and similarly the year field also.Here I should not be able to edit the "/" which is in between dd and mm, mm and yyyy.Is there any date format which i can set to textfield to achieve this.
pls help me.
this is urgent
ThanxCan any one tell me how to make part of contents of textbox non editable and rest of the text editable???
help me pls
In the above dd/mm/yyyy format, "/" should be non editable and rest of the fields should be editable but can't be deleted.
is it possible to achieve this...
Pls respond............ -
Date Format Error During Cycle Count Activation
Hi MM Guru's,
Could you kindly help me with regards to my problem?
I was trying to activate the cycle count for the newly plant i created under new company code.
But im getting a date format error?
Anyone who could help me regarding this?
Thank you in advance.HI All,
I have check my own data date format.
But when i tried to activate the cycle count under
Menu path:
Materials Management > Inventory Management and Physical Inventory>Physical Inventory> Cycle Counting
I will not put any date on it, that's why its weird that i get an date format error.
Where this error came from?
Thanks.. -
Date Format in 'HH:MI' - help needed
I have a table details that contains time_status column of Timestamp datatype.
Data is stored in the column in the format '1/1/2008 10:31:00.000000 AM'.
Now I want to select the data in HH:MI fopmat only.
i.e., for '1/1/2008 10:31:00.000000 AM' I should get 10:31.
I have written as select to_char(time_status,'HH:MI') from dual;
I am getting an error when this query is included in the procedure.
When I am executing outside, its is working.
Also, How can I get the format a '1/1/2008 10:31'.
Thanks in advance.
Regards
Raghunadh.I have a table details that contains time_status column of Timestamp datatype.Good. Always use the correct datatype. Either date or timestamp.
Data is stored in the column in the format '1/1/2008 10:31:00.000000 AM'.
Wrong! A timestamp or also a date column has no format! Same as a number column has no format.
Now I want to select the data in HH:MI fopmat only. i.e., for '1/1/2008 10:31:00.000000 AM' I should get 10:31.When you work with date and timestamps you don't need any format. When you display the value, then you need to change your date into a string. Only during this transformation formatting takes place.
Example:
SQL*Plus: Release 9.2.0.2.0 - Production on Thu Aug 21 10:45:17 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
/* lets do a simple date select */
SQL> select sysdate from dual;
SYSDATE
21-AUG-08
"Attention!" Sql*Plus did an implizit date to string conversion to show this value on the screen.
It used the NLS settings for the format.
/* Now lets change the nls settings */
SQL> alter session set nls_date_format = 'FMddth Month YYYY';
Session altered.
SQL> select sysdate from dual;
SYSDATE
21st August 2008
SQL>
"Different output for the same query! Value is the same, only the formatting was changed."
I have written as select to_char(time_status,'HH:MI') from dual;You should ask yourself, why do I want this string?
I am getting an error when this query is included in the procedure.
When I am executing outside, its is working.
Also, How can I get the format a '1/1/2008 10:31'.Check the documentation (sql manual) for the many options for the date format settings. Also check for timestamps, they are a bit more difficult to handle than dates.
Thanks in advance.
Regards
Raghunadh.You're welcome. -
Hi,
We have an OIM 11g R2 version running that has a GTC installed and configured. The GTC is used to provision to a 11g R2 database table via the DBAT 9.1.0.5.0 connector. Now the requirement is that the timestamp be recorded in the backend DB when a new record is provisioned to it using the GTC.
During the setup of the GTC, the target system date format is asked for should be one from among the values allowed by the following predefined formats:
Customizing Formats (The Java™ Tutorials > Internationalization > Formatting)
Now our problem is that the target DB to which the provisioning is supposed to happen, isn't under our control and hence we cannot change its schema, and the date format in that table is of the type "01-JAN-10 12.00.00.000000000 AM", which translates to "dd-MMM-yy hh.mm.ss.fffffffff (AM/PM)".
On the other hand, as you can see from the above link, none of the values that OIM allows to be passed through the GTC allow for that format to be used.
Does anyone know of any way in which we can intercept the GTC provisioning request and convert the date on the fly, after OIM has passed on the control, but before the values are written into the DB table, or does anyone know of any workarounds to this issue?
I'd really appreciate it if someone could provide a solution to this.
Thanks.[http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/refsched.htm#CIHBFCJG]
See 26.6 for the plugin.zip directory structure, and as I said, I used the same method on a previous task in the same OIM instance.
Edited by: 939908 on Jan 31, 2013 8:04 AM -
Problem with SQL*Loader and different date formats in the same file
DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
System: AIX 5.3.0.0
Hello,
I'm using SQL*Loader to import semi-colon separated values into a table. The files are delivered to us by a data provider who concatenates data from different sources and this results in us having different date formats within the same file. For example:
...;2010-12-31;22/11/1932;...
I load this data using the following lines in the control file:
EXECUTIONDATE1 TIMESTAMP NULLIF EXECUTIONDATE1=BLANKS "TO_DATE(:EXECUTIONDATE1, 'YYYY-MM-DD')",
DELDOB TIMESTAMP NULLIF DELDOB=BLANKS "TO_DATE(:DELDOB, 'DD/MM/YYYY')",
The relevant NLS parameters:
NLS_LANGUAGE=FRENCH
NLS_DATE_FORMAT=DD/MM/RR
NLS_DATE_LANGUAGE=FRENCH
If I load this file as is the values loaded into the table are 31 dec 2010 and 22 nov *2032*, aven though the years are on 4 digits. If I change the NLS_DATE_FORMAT to DD/MM/YYYY then the second date value will be loaded correctly, but the first value will be loaded as 31 dec *2020* !!
How can I get both date values to load correctly?
Thanks!
SylvainThis is very strange, after running a few tests I realized that if the year is 19XX then it will get loaded as 2019, and if it is 20XX then it will be 2020. I'm guessing it may have something to do with certain env variables that aren't set up properly because I'm fairly sure my SQL*Loader control file is correct... I'll run more tests :-(
-
Date format is not working properly for Calender value help
Hi Experts,
We have two problems.
1. We want to change the format of date displayed. We want format of dd-MMM-yy. For that we have created one Simple
Type Dictionary Object with Displaying format dd-MMM-yy. It is working
fine for the non editable UI. But once I apply the dictionary type
object as data type for an input field, probem happens. Once the user
choose a date from calender value help the value in the input field is
coming like 01-011-12 not like 01-Jan-12.
The date format is not changing from the calender. But if we set the
display format of the dictionary object to MM-dd-yy or MM/dd/yy or
dd/MM/yy or dd-MM-yy the format conversion from calender to input field
is happening properly.
The only problem once we put MMM in place of MM for the input field
where user is selecting from a calender value help.
2. We want to restrict users from entering the value manually for date input field. The user
should be able only to enter value by selecting from calender value
help.
Please give suitable solution for these problems
Thanks
ShankhaHi Sankha,
Please refer the links below:
http://scn.sap.com/thread/1659463
http://scn.sap.com/thread/1533443
Regards,
Manoj -
Table date format - How can I display Week 1, Week 2, instead of the date?
I would like to creat a table for my Gantt, that displays the week number unit, as I have as the middle tier in my timescale on the Gantt side of the view. I cannot find how to do this anywhere. I know I can change the way the date is displayed,
format wise, while in the table edit area, however one of the choices is NOT the week #. The data must exsist as the timescale displays it!
My goal is to creat a table that instead of showing the start date for a task, displaces the start week: i.e. Week 1, Week 2, ...ect.
Any help is appreciated,
Craig.Craig --
Bad news, my friend. What you want to do with the date format in the table cannot be done. The format you see in the Timescale bar is simply not an available date option in any table. Sorry.
Dale A. Howard [MVP]
VP of Educational Services
msProjectExperts
http://www.msprojectexperts.com
http://www.projectserverexperts.com
"We write the books on Project Server" -
How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
I currently run OS X 10.10.1
Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
Here is an example of what i want to happen.
I will have 2 tabs: Contact | Sales
Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
Now how do i do this, Excel can do this so how can numbers do it?Hi Shegra,
Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
quinn
Script starts:
-- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
property DataEntryTable : "Sales" --name of table with popups to be refreshed
set copyRange to {}
property PopValueSheet : "Sheet 1" --name of sheet with popup values table
property PopValueTable : "Contacts" --name of table with popup values
set PopStartRow to {}
tell application "Numbers"
set d to front document
set ps to d's sheet PopValueSheet
set pt to ps's table PopValueTable
set s to d's sheet DataEntrySheet
set t to s's table DataEntryTable
set tf to t's filtered --this records filter setting on data Entry Table
display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
set PopStartRow to {text returned of result}
tell pt --convert list to alphabetized popups
set ptRows to count rows
set copyRange to ("A2:" & name of cell ptRows of column "A")
set selection range to range copyRange
set selection range's format to text
sort by column 1 direction ascending
set selection range's format to pop up menu
-- popupsmade
set selection range to cell ptRows of column 1 of pt
set v to value of cell ptRows of pt
end tell
activate application "Numbers"
tell application "System Events" to keystroke "c" using command down
tell pt
set selection range to range copyRange
set selection range's format to text
end tell
tell t
set filtered to false
set tRows to count rows
set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
set selection range to range pasteRange
tell application "System Events" to keystroke "v" using command down
set filtered to tf
end tell
end tell -
How to get a correct date format
Hi Experts,
I fetched a record from the table KALV. Here its showing the date format as DD.MM.YYYY. But in my internal table and my output its showing YYYYMMDD.
How to solve this?
Actually this report needs to show the output as per the user's format. Because may have different format. Accoriding to there format it should show the output.
How todo this?
Anyone guide this?
Mohana
Moderator Message: Basic Question.
Edited by: kishan P on Feb 3, 2011 4:14 PMHere's a sample of the code:
[NSDateFormatter setDefaultFormatterBehavior:NSDateFormatterBehavior10_4];
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setDateStyle:NSDateFormatterShortStyle];
NSDate *date = [ dateFormatter dateFromString:@"7/4/2008" ];
NSLog(@"string from date %@: %@ for locale %@", date, [dateFormatter stringFromDate:date], [[dateFormatter locale] localeIdentifier]);
(the same code without the messed up forum syntax is at http://pastebin.com/f695ef95b)
When I set my region (in the International system preferences) to be United States, it prints:
2008-08-14 20:20:31.117 Date Difference[17226:10b] string from date 2008-07-04 00:00:00 -0400: 7/4/08 for locale en_US
And when my region is United Kingdom, it prints:
2008-08-14 20:19:23.441 Date Difference[17199:10b] string from date 2008-04-07 00:00:00 -0400: 07/04/2008 for locale en_GB
It looks like the NSDateFormatter is insensitive to the change of regions. Notice that the raw printing of the date is properly switching with the region, though.
What do I have to do to get the NSDateFormatter to respect the region setting? -
How can i convert a the date format 'm/d/yyyy hh:mi:ss AM' to 'MM/DD/YYYY HH:MI:SS AM' in Oracle
I have a query
select UPPER(t.val_10) "TYPE", count(val_3) "Number of Transfers"
from table1 t
where t.is_active = 1
and t.val_4 = 'INBOUND'
and to_date(to_date(val_5,'MM/DD/YYYY HH:MI:SS AM'), 'DD/MM/YY') between to_date(to_date('01/08/2008 00:00:00','DD/MM/YYYY HH24:MI:SS'), 'DD/MM/YY') and add_months(to_date(to_date('01/08/2008 00:00:00','DD/MM/YYYY HH24:MI:SS'), 'DD/MM/YY'),1)
group by UPPER(t.val_10)
order by UPPER(t.val_10)
I get the error [ORA-01861: literal does not match format string which i think is because
val_5 has the values in the following format:
8/29/2008 6:31:10 PM
Does anyone have an answer?
Thanks in advance
Edited by: user2360027 on 26-Mar-2009 03:50first off, you've got to_date(to_date(...)) - NEVER do this - you're forcing an implicit to_char which can cause all sorts of problems!
What is the data type of your column val_5? If it's DATE then your query is simply:
select UPPER(t.val_10) "TYPE",
count(val_3) "Number of Transfers"
from table1 t
where t.is_active = 1
and t.val_4 = 'INBOUND'
and val_5 between to_date('01/08/2008','DD/MM/YYYY') and add_months(to_date('01/08/2008','DD/MM/YYYY') ,1)
group by UPPER(t.val_10)
order by UPPER(t.val_10)If it's a varchar2 (why, oh why, oh why, ...?!), then your query should be:
select UPPER(t.val_10) "TYPE",
count(val_3) "Number of Transfers"
from table1 t
where t.is_active = 1
and t.val_4 = 'INBOUND'
and to_date(val_5, 'mm/dd/yyyy hh:mi:ss AM') between to_date('01/08/2008','DD/MM/YYYY') and add_months(to_date('01/08/2008','DD/MM/YYYY') ,1)
group by UPPER(t.val_10)
order by UPPER(t.val_10)Remember that dates in DATE format are stored in an internal Oracle format - in order for you to tell Oracle that your string is a date, you need to use to_date. When you want to retrieve a date, you need to use to_char to put it into the format you want to see it in.
Remember also that your nls_date_format defines the default format that you'll see a date, which is what is used in the implicit conversion that oracle does when you select a date:
SQL> alter session set nls_date_format='dd/mm/yyyy hh24:mi:ss';
Session altered.
SQL> select sysdate from dual;
SYSDATE
26/03/2009 11:01:53
1 row selected.
SQL> alter session set nls_date_format='mm/dd/yy hh12:mi:ss AM';
Session altered.
SQL> select sysdate from dual;
SYSDATE
03/26/09 11:02:24 AM
1 row selected.It doesn't make sense to convert something that's already in a DATE format into a DATE format - in order to do that, oracle has to first change the date into a string, and it does that by using the nls_date_format parameter setting - if you're working with dates-in-strings that are in a different format, then all sorts of problems arise, as you have found out! -
Date format in OBIEE 10g Calender Control
Once date selected in Calender, it is taking Date-Time format automatically.
i.e when we select 20/01/2013 in calender and select GO button, then it takes '20/01/2013 00:00:00'. How can we change from Date-Time format to Date format only.
Best regards,Check this
http://108obiee.blogspot.com/2009/03/how-to-change-date-format-mask-in-date.html
Btw: Is that causing on report data?
Mark as correct
Edited by: Srini VEERAVALLI on Apr 25, 2013 7:02 AM
Maybe you are looking for
-
System freezes after update w/ 'testing repo'
i'm using xfce with compiz and everything was fine til I updated my system with testing repo enabled.. here is my Xorg.conf # nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings: version 1.0 (buildmeister@builder3) We
-
How can I remove updates from my I-pad
How can I remove updates from my I pad
-
Maintaining Infotypes in PP01 for Central Person while already maintained n
Dear Team, When we are using PP01 Transaction code by taking Object type Central Person system is showing is showing IT0001, IT0002, IT0006 and IT0009 etc. Please let us know the purpose of using all these infotypes as we have already maintained the
-
I'mI looking for a software that allows me to add accessories or furniture items in the picture for interior design purposes. Is photoshop cc able to do this?
-
Hi, I really want to sync some music on my Iphone 5s but whenver I go onto Itunes it says Unknown Error -45054. What do I do?