Generic Date Format
Hi Folks,,
I am using regex in my java code ..i need to specify the date as generic format...i tried with some cde ..i ned your suggestions whether is it correct..am i going in right path??
Dated<space><DateFormat>
Here is my java code:
Matcher Assetdate=Pattern.compile(("Dated\\s*|\\d*/\\d*/\\d*|\\w*-\\d*-d*"),Pattern.CASE_INSENSITIVE).matcher(line1);
while(Assetdate.find()){
System.out.println(Assetdate.group());
}Thanks.
If you want to support all date formats valid in an XML document use XMLGregorianCalendar to parse dates:
[http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/datatype/DatatypeFactory.html#newXMLGregorianCalendar(java.lang.String)]
-Puce
Similar Messages
-
"Date formatting not supported yet"??
When I add imports to get around the problem described in my previous
email, I run into an exception that says "Date formatting not supported
yet". The exception is thrown in util/HtmlUtil.java. What's the
intention here? Why don't we just return the value unformatted? How
should I handle this so I can take advantage of the formatting if it is
supported someday? Are there any other formatting types which I need
to "handle" in order to run?Dan--
When I add imports to get around the problem described in my previous
email, I run into an exception that says "Date formatting not supported
yet". The exception is thrown in util/HtmlUtil.java. What's the
intention here? Why don't we just return the value unformatted? How
should I handle this so I can take advantage of the formatting if it is
supported someday? Are there any other formatting types which I need
to "handle" in order to run?The exception lets you know that there is a specific issue you need to work
around during migration. The reason we don't just return the unformatted
value is that we didn't want to give the impression that date formatting
worked when it doesn't (yet).
If you just want the value to come through without an attempt at formatting,
the correct thing to do is to change your JSP tags to eliminate the date
formatting attributes. If this is a loss of data (the format masks), then
you should just comment them out rather than delete them.
The whole issue of date formatting is unfortunately complex. Suffice to say
that it is far easier for the developer to format the date as they wish in
their code then it is for us to try and provide generic date formatting.
The issue revolves around having all the necessary information in order to
do the formatting in a generic way.
Todd -
Hello all,
In B2C, when searching for open orders or completed orders, the result list is displaying the AUDAT in format yyyymmdd. The rest of the B2C site displays dates in mm/dd/yyyy format.
I have not been able to locate where to change this date format. Is there a specific config file, or xcm that needs to be modified?
Thanks,
StevenI was able to figure this out.
I was working on hiding the Description field of the B2B template screen when I noticed the date field had fieldOutputHandler attributes. I added the following attributes to the AUDAT property of the B2C section of generic-searchbackend-config.xml and now the date is being formatted correctly.
fieldOutputHandlerClass="com.sap.isa.ui.uiclass.r3.genericsearch.GenericSearchUIDynamicContentERP" fieldOutputHandlerMethod="getAudatToUIDate" -
How to enable delta in a generic Data Source
Hi,
I am developing a Generic Data Source (Z) based on a view.
How can i enable it to delta capable...
What is the concept of Calanderday......timestamp....pointer
How can i make a decesion (what factors do i need to consider) to go for Calanderday......timestamp....pointer
Please provide me detail steps & description on this as this is my first data source
Thankshi
how to ...gds
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
1. Time stamp - The field is a DEC15 field which always contains the time stamp of the last change to a record in the local time format.
2. Calendar day - The field is a DATS8 field which always contains the day of the last change.
3. Numerical pointer - The field contains another numerical pointer that appears with each new record
Please check this link on generic delta
http://help.sap.com/saphelp_nw04s/helpdata/en/37/4f3ca8b672a34082ab3085d3c22145/frameset.htm
WHEN U CHECK UR DATASOURCE IN RSA6 U WILL FIND THE DELTA UPDATE CHECKBOX IS CHECKED.....
hope it helps,
cheers. -
Af:table filter date format : task-flow navigation issue
hi
When trying to use the date format configured on the Entity Object, with Format Type as Simple Date and Format as "dd-MM-yyyy", there seems to be a problem when using task-flows.
The approach involves an explicitly configured attributeValues binding to use in f:validator and af:convertDateTime components in the af:inputDate in the filter facet, as discussed in the forum thread "af:table filter date format"
at af:table filter date format
I used JDeveloper 11.1.1.3.0 to create the example application
in http://www.consideringred.com/files/oracle/2010/TableFilterDateFormatIssueApp-v0.03.zip
- The page filterEmp.jspx shows expected behaviour, the filter uses the configured date format and there is no problem when navigating to another page and back.
see the screencast at http://screencast.com/t/CtQ9rsVFH3k
- The page menuBTFPage.jspx allows for some navigation after using the filter resulting in the filter showing a date in the wrong format, using scenario (sc1)
-- (sc1-a) : run menuBTFPage.jspx
-- (sc1-b) : on "menu-btf : menu", click the "do go-filter-emp-btf" link
-- (sc1-c) : on "filter-emp-btf : filterEmpFragment", filter on HireDate using "10-03-2005"
-- (sc1-d) : click the "do goReturnSuccess" button
-- (sc1-e) : back on "menu-btf : menu", click the "do go-filter-emp-btf" link again
-- (sc1-f) : back on "filter-emp-btf : filterEmpFragment", see the HireDate filter value in the wrong format as "2005-03-10"
-- (sc1-g) : click the "do goReturnSuccess" button again, which results in an error "The date is not in the correct format."
see the screencast at http://www.screencast.com/t/ORHauBd3oQ
questions:
- (q1) Can the behaviour in scenario (sc1) be reproduced?
- (q2) Why is the filter value in the wrong date format in step (sc1-f)?
- (q3) What can be done to have the filter value consistently in the configured date format, so that errors as in step (sc1-g) can be avoided?
many thanks
Jan Verveckenhi
First a short summary of relevant aspects of service request 3-2190488381:
- development has reviewed bug 10193260
- development identified some code where a pattern was not applied and started fixing the problem
- out of the blue, development asked "Will clearing out the filter field completely when moving out of ataskflow be an acceptable behavior ?"
- I pointed out some concerns (even in a phone call with development), but development did not see any alternative not "perceived to be very risky because of the current design", so the question whether the clearing-all-filter-fields approach would be acceptable became superfluous.
- following this, bug 10193260 suddenly became an enhancement request (for reasons I still don't understand)
- a workaround was suggested (for behaviour not perceived as a bug), "Clearing the search fields during taskflow exit in the backing bean (in the app)." for which I also received a modified version of my example application TableFilterDateFormatIssueApp-v0.04.zip with an implementation of the suggested workaround
As an exercise to try an understand the suggested workaround (an because my example application seemed to have been modified using the currently yet-to-be-released JDeveloper 11.1.1.4.0) I re-implemented it in the example application
at http://www.consideringred.com/files/oracle/2010/TableFilterDateFormatIssueApp-v0.05.zip
It has a filter-emp-workaround-btf task-flow with a method-call activity on a managed-bean method, responsible for clearing the search fields, resulting in behaviour where the error "The date is not in the correct format." does not occur,
as can be seen in the screencast at http://screencast.com/t/Nq7TkkRQ
public void clearFilterFields()
BindingContainer vBindingContainer =
BindingContext.getCurrent().getCurrentBindingsEntry();
DCBindingContainer vDCBindingContainer = (DCBindingContainer)vBindingContainer;
DCDataControl vDCDataControl = vDCBindingContainer.getDataControl();
ApplicationModule vApplicationModule = vDCDataControl.getApplicationModule();
ViewObject vViewObject = vApplicationModule.findViewObject("EmployeesVOVI");
ViewCriteriaManager vViewCriteriaManager = vViewObject.getViewCriteriaManager();
vViewCriteriaManager.clearViewCriterias();
vViewObject.clearCache();
}Because the managed-bean method requires access to the ADF Model binding layer to get to the View Object instance used for the filtered table, the method-call activity has a page element configured in DataBindings.cpx referring to the same usageId as the page element for the page fragment showing the filtered table. So that both the method-call and view activity depend on one and the same Binding Container (e.i. PageDef file).
The method-call activity, responsible for clearing the search fields, would need to be called before each task-flow-return activity.
As there can be multiple view activities with multiple filtered tables in a bounded task-flow, would that result in multiple method-call activities responsible for clearing search fields (all to be called before each task-flow-return activity)?
It looks like a more general/generic approach is desirable for the suggested workaround to be feasible.
- (q5) Does the suggested workaround imply (as bug 10193260 is not a bug) that all bounded task-flows with filtered tables should implement it to avoid errors about formatting?
thanks
Jan -
Function modules transfer repeated records in Generic data source
Hello Friends ,
I have created a FM to extract the data from fields of tables BKPF and BSEG .
This functional module is used in the Generic data source.
Now if I check in RSA3 for this Generic data source,
the records are coming 10 times instead of a single time.
Means one records at data base table is showing ten records in RSA3.
Any help please.
Regards,
Amol.Hi Amol,
Can you please check the Fetch statement that you are using after opening the cursor and selecting data into it. It should be in the format below.
FETCH NEXT CURSOR S_CURSOR APPENDING CORRESPONDING FIELDS OF TABLE E_T_DATA PACKAGE SIZE S_S_IF-MAXSIZE.
Also are you incrementing data package ID or not by using the statement
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
Regards,
Prakash B -
Timestamp field in Generic Data sourcce.
Hi All,
i have created a generic datasource using tables vbrp,vbrk.mara,marc,knvv.. to get the sales data for planning.Here i have document created date and time.So i'm concatinating these 2 date and time fields into timestamp which is of format yyyymmddhhmmss.Finally i'm using this timestamp to extract data .
So is it the right way to pull the data using timestamp and what is the timezone i need to specify as the servers are in india only.
or any other way to proceed.
Thanks
Rao.Hi VS,
The following are the delta specific fields that can be used while creating a generic data source.
1. Time stamp - The field is a DEC15 field which always contains the time stamp of the last change to a record in the local time format.
2. Calendar day - The field is a DATS8 field which always contains the day of the last change.
3. Numerical pointer - The field contains another numerical pointer that appears with each new record
Also the following are some useful links about delta setting in generic datasources.
|http://help.sap.com/saphelp_nw04s/helpdata/en/37/4f3ca8b672a34082ab3085d3c22145/frameset.htm]
Creation of Generic DS:[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33] -
Timestamp field in Generic data source
Hi ,
I need , what field we used as a TimeStamp in Generic Data source. and also can any body explain how to set timestamp delta , in Generic & Co_PA data sources.please. If any body gives right answer I will assign points to them.
thanks.Hi Leela,
Pls chk this link:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
how to ...gds
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
1. Time stamp - The field is a DEC15 field which always contains the time stamp of the last change to a record in the local time format.
2. Calendar day - The field is a DATS8 field which always contains the day of the last change.
3. Numerical pointer - The field contains another numerical pointer that appears with each new record
http://help.sap.com/saphelp_nw04s/helpdata/en/37/4f3ca8b672a34082ab3085d3c22145/frameset.htm
*pls assign points, if info is useful*
Regards
CSM Reddy -
F:convertDateTime - how to define two valid date formats?
I have an input field that accepts a date. There are two valid date formats allowed: yyyyMMdd & yyyyMMM
I am currently doing this ...
<h:inputText ...>
<f:convertDateTime pattern="yyyyMMdd" />
<f:convertDateTime pattern="yyyyMMM" />
</h:inputText>
... but only the second date format is being accepted as valid.
How can I specify two valid date formats for the input?
Thanks,
rh
Edited by: user13328234 on Oct 27, 2010 12:47 PMuser13328234 wrote:
Thanks for the suggestion. I was actually using it for validation, so I implemented a custom validator so I'm good now.
But, for some reason I expected it to work with two converters specified, and I'm a little disappointed it didn't work.
Thanks again,
rhExpecting = assuming. Its getting old and annoying now, but it remains a very bad idea.
The fact of the matter is that you have a very specific need. There is only one way to tailor to specific needs in a generic API: allow to override default behavior. The other option is to create a bloated API that tries to incorporate so many bells and whistles that it becomes unusable. So in my opinion, JSF is designed exactly the way it is supposed to be in this respect. -
Hi Tim,
I am facing some issues with formatting the date using XMLP. The following is the sample XML data file i am using:
<LIST_G_HEADER>
<G_HEADER>
<QUOTE_HEADER_ID>1455</QUOTE_HEADER_ID>
<QUOTE_NUMBER>2027</QUOTE_NUMBER>
<QUOTE_VERSION>1</QUOTE_VERSION>
<QUOTE_NAME>Test GM Report - Rabindra</QUOTE_NAME>
<SOURCE_NAME>Fletcher, MR. Paul</SOURCE_NAME>
<QUOTE_DATE>27-OCT-2005</QUOTE_DATE>
<CURRENCY_CODE>GBP</CURRENCY_CODE>
</G_HEADER>
</LIST_G_HEADER>
The formatting i use for my date field i.e <QUOTE_DATE>, ends up either with NO formatting or giving me an error "[010906_114656657][][ERROR] Invalid XSD string: 27-OCT-2005 (XMLP Template Viewer)". The default formatting available with the form field dialog box (MS-Word) feature also doesn't work.
I have the following formatting for this field in the form field:
<?format-date:QUOTE_DATE; 'MEDIUM' ?>
When i read the user guide, it reads that the date should be in the canonical format i.e: YYY-MM-DDThh:mm:ss+HH:MM
However i am not getting the date from the base table's in this format. Is the error happening due to incorrect format or is there some other reason behind this? Please let me know, how can i overcome this issue.
Thx,
NitinAs i mentioned in another thread
substring function and date format
Please use this standards
<?xdofx:expression?>
for extended SQL functions or
<?xdoxslt:expression?>
for extended XSL functions.
Use like
<?xdofx:rpad(LAST_NAME),30, ’x’)?>
<?xdofx:Instr(’abcabcabc’,’a’,2))?>
<?xdofx:upper(char)?>
<?xdofx:lower (char)?>
<?xdofx:greatest ( expr [, expr]... )?>
ETC..... -
How can we give the Data Format (File Type ) in Runtime
Hi all,
How can we give the Data Format (File Type ) in Runtime for the following method,
cl_gui_frontend_services=>gui_download.
Thanks in advance
SriThere is a filetype parameter which you can set
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
* BIN_FILESIZE =
filename =
* FILETYPE = 'ASC'
* APPEND = SPACE
* WRITE_FIELD_SEPARATOR = SPACE
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = SPACE
* WRITE_LF = 'X'
* COL_SELECT = SPACE
* COL_SELECT_MASK = SPACE
* DAT_MODE = SPACE
* CONFIRM_OVERWRITE = SPACE
* NO_AUTH_CHECK = SPACE
* CODEPAGE = SPACE
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = SPACE
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* IMPORTING
* FILELENGTH =
changing
data_tab =
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* NOT_SUPPORTED_BY_GUI = 22
* ERROR_NO_GUI = 23
* others = 24 -
Need to convert into date format
Hi all,
I need to convert '2008-11-26T11:07:38-06:00' [YYYY]-[MM]-[DD]T[HH]:[MM]:[SS][TIMEZONE]
in format 'YYYY-MM-DD HH:MM:SS'.
Thanks in advance.>
Thank you for your reply
But it is giving me output as '26-NOV-08'
And I want in format '2008-11-26 07:38' i.e 'YYYY-MM-DD HH:MM'.
>
Then you are not looking for a date, You are looking for a string.
The date format that gets displayed is dependent on nls_date_format parameter.
If you want a string in the format you asked, then,
SELECT TO_CHAR ( TO_DATE ( '2008-11-26T11:07:38-06:00', 'YYYY-MM-DD"T"HH24:MI:SS"-06:00"'), 'YYYY-MM-DD HH24:MM:SS')
FROM DUAL;Or if you just want the date to be displayed like that then
Do,
SQL> alter session set nls_date_Format="YYYY-MM-DD HH24:MI:SS";
Session altered.
SQL> SELECT TO_DATE ( '2008-11-26T11:07:38-06:00', 'YYYY-MM-DD"T"HH24:MI:SS"-06:00"') dt
2 FROM DUAL;
DT
2008-11-26 11:07:38
SQL> G. -
Changing date format at reporting level
Hello,
Will u plz tell me how can i change the date format at reporting level?
I want to display date in dd/mm/yyyy, but by default its showing mm/dd/yyyy.
Delta is already loaded in the system, so i don't want to disturb regular data loading.
Is there any way so that i can change the format of date.
Plz help me out.
Thanks,
Regards,
SteveHi steve
There r so many postings on the same topic
go through these previous threads
date format
Date format
u can find solution
regards
Ravi Kiran -
How to convert the numeric to date format
HI ,
We have created the date KF and selected the data type as DEC-numeric or counter and add in the cube.
the data for this fields in the cube are in numerics like 734.504, but when we execute the report it is converted in to date format dd.mm.yyyy.
My issue how this conversion is working in the backend while executing the report.
Regards.
venkataConversion is happening because of the type you had selected for the KF while creating it.
Check the type of the Key figure?
While creating the KF you might have selected the Type as Date and Data type -DEC : Counter or amount field with comma and sign.
that's the reason why you are getting the output values displayed in dd.mm.yyyy format.
For amount field - create a KF with type "AMOUNT" and unit -0currency or specify the currency of that region.
regards
KP -
How to get Date Format from Local Object.
Hi All,
I am new to Web Channel.
I need to know Date format From date of locale.
suppose there is a date "01/25/2010" date in date field I want to get string "mm/dd/yyyy". Actually I have to pass date format to backend when I call RFC.
Is there any way to get Date format from "Locale" object. I should get date format for local object
I get local object from "UserSessionData" object but how to get Date format from it.
I am not looking for Date value. I am looking for current local date format ("mm/dd/yyyy or dd/mm/yyyy or mon/dd/yyyy) whatever local date format. I could not find example which show how to get date format from "Locale" object.
Any help will be appreciated with rewards.
Regards.
Web ChannelHi,
You can get it from "User" or "Shop" business object.
Try to get User or Shop Business Object as shown below.
BusinessObjectManager bom = (BusinessObjectManager) userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
User user = bom.getUser();
char decimalNotation = user.getDecimalPointFormat().getGroupingSeparator();
If you are seeing "1,234.00" then above code will return "."
I hope this information help you to resolve your issue.
eCommerce Developer.
Maybe you are looking for
-
How do I replace one JPanel on a JFrame with another?
I want to replace one JPanel on a JFrame with a different JPanel when the user clicks on a certain menu item. The menu item is working corrrectly but I cant seem to repaint / refresh the component. My code is as follows: c.add(knotPanel, BorderLayout
-
Connecting apple tv to a stereo amplifier
my apple tv is connected to tv with a hdmi cable and it works. i want to connect it to a stereo amplifier without passing through tv. since apple tv has only optical cable outlet, i bought a optical to analog converter. but still i haven't get sound
-
I opened the backup window of my time machine. I now wish to exit. The cancel button and Command quit have no effect. Turning off the IMac and disconnecting the time machine have no effect. I have no access to the normal tool bar. I want outa here
-
Hi Have been using logic express 8 for a wee while, but i've done something I don't know how to undo - or the computer has. I have been working on a track for my composition assignment, and now the main window has dissapeared... just on that song...
-
Dear Aspitants, While creating Purchase Order for Stock Transport Order Shipping Tab is not reflecting. Please Guide me. Thanks&Regards