Application Express :: Changed Date Formats For Several Different Ways
Jul 18, 2013
I have an APEX Page , page no1 for person's details that got fields like name, Date of Birth. When user enters the details, it get saved. Now when we want to edit a person's details, we click on that person then it goes to next page, where we can change/details of the person.But when i tried to do that, i am getting Not a valid month error.. log message shows that it is coming from : Automatic Row Processing (DML)- an after SUBMIT process. Is there a way to avoid this error?I changed date formats for several different ways.
As all of you know, In the Apex, when you create a form with report in the page, you are able to insert and edit data. But when you edit the data, the data will be modified in the same row. In other word, you loose the old data.
What I need to do is: I have revised_num field and production_date field. I want to create a form with report and insert and edit data as is in the apex and insert 0 to the revised num until production date is null. But when production date is not null, then from that point, I want to insert data to another row and modify revised num to 1. and I want the revised num be incremented by 1 each time the user modifies the data after the production date is not null.I don't know where I should start.
My requirment is to find out the period names and transactions which are in valid date formats and are less than sysdate and the non date formats are adjustments made by different users for their transactions
I have been allocated a new PC. Where is the date format used by forms (6i) set up. I previously used to enter 20110519 in the application and it used to accept. It now does not accept the above format.
The nls_date_format on the database is setup as YYYYMMDD.
I have another interesting SQL Loader issue. I have created 2 prior topics RE: "Trapping SQL Loader summary counts" and "Using Sql Loader issue". This new issue is along the same lines, but unfortunately the same input csv file has a date field that is has a different input format..
The 10G Oracle Table looks like... --------------------------- CREATE TABLE PTLIVE.MODULE_CSV_LOADS ( MODULE_ID NUMBER (20), MODULE_TAGNUMBER VARCHAR2(100), MODULE_SERIAL_NUMBER NUMBER (20,0),
[code]...
My initial control file looks like... ----------------- OPTIONS (SKIP=1) load data infile 'J:GrowerRound_ModulesCrop2011ProcessedBatch_2011Jul12_081326_746563.csv' BADFILE 'J:GrowerRound_ModulesCrop2011LogsBatch_2011Jul12_081326_746563.bad'
[code]...
The input csv data file (for this example) contains 3 records. The first is a heading record that is skipped. The 2nd record is correct and the field entitled "GMT Date" contains a value of "16/05/2011". The 3rd record, however, has a date of "2011/5/18", which get rejected by the above control file, as the output SQL Loader log indicates...
Record 2: Rejected - Error on table PTLIVE.MODULE_CSV_LOADS, column DATEPICKED. ORA-01861: literal does not match format string
Now we will be receiving literally hundreds of these csv files and in testing I have found that when I open the csv file (the default is Excel), and Excel must alter its display, as all date appear 100% okay. However, upon opening the csv file with Wordpad, I discovered the dates in the same file had these 2 different formats. So the control file was attempting to concat the input csv file "GMT Date" in one format with the input "GMT_TIME" to load the output value into the Oracle table column "DATEPICKED" ... but different date formats cause some records to be rejected.
It would be super if SQl Loader could use a IF clause or an OR clause to execute loading the date in one or more input formats. We only expect the 2 foramts DD/MM/YYYY or YYYY/MM/DD....however, there could be 6 different combinations in theory.
I thought about writing a Function or Procedure to analyst the input date and output a standard one to load into the Oracle column
Had some issues with a page on which i changed the value of an item using javascript and added a dynamic action (dummy pl-sql) that submitted the item. The problem was that if i also used $x_disableItem to disable the item in the function that set the value , the value submitted was always null. However if i used the "Disabled" attribute from the item Settings and remove the calling $x_disableItem in the function, the value submitted is correct.
To reproduce , create these objects on a page (default everything not specified):
I worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list take value of checkbox item and show it in message .
i change the column attributes of Dept_NO to Display as Select list of department name (named lov). Now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
i create JavaScript on the page
function test(pThis) { var f01_value = $('select[name="f01"]').value; alert('#SEQ : '+ f01_value); } </script>
I call this javascript function when list change but the value undefined..
My Question :
How can get this value Or any value of item in reports ?
I am using Skilllbuilders modal page 2.0 to edit the form. Sometimes, the end user clicks on the edit link to trigger the modal page and sees the form , but he/she could not do any changes. Thus, when clicking Apply Changes button, we will be redirected to the page 102 ( the empty page ). How can I get around and make the page 102 to close automatically in case I am redirected to it ?
I put this in a JavaScript a dynamic action to be fired as page loads:
I am experimenting with the 4.2 version of Apex at URL.....
I have created a tabular form (based on a view with an instead of trigger) and have restricted this form to "Update only" mode. Whenever I modify a field value and submit the change I get the error "Current version of data in database has changed since user initiated update process".
Version : 4.1.1, I have a tabular form on a DB table. One of the columns is a date field. When the user hits the "add Row" button on the tabular form, I want the Date field to be defaulted to sysdate. Here is what I have tried so far,
1. Created a "hidden" item P1_SYSDATE and populated the default value with sysdate. After this, under the DB tabular report date field, I used default type - Item/application on this page and entered P1_sYSDATE
2. Instead of populating the default value of the P1_SYSDATE hidden item, I created a before regions process and added
:P1_SYSDATE := sysdate
and added P1_SYSDATE to default type of the tabular date field with default type as "ITem/application on this page.
I get the error
ORA-01790: expression must have same datatype as corresponding expression
I tried to_Char(sysdate,'dd-mon-yyyy') and then converting it back to to_date. still no luck.
in my application I have several pages with the item of date. How to ensure that all items had the same date for all pages and can be set on each page ?.
Application Express: 4.1.0.00.32 DB: Version 10.2.0.4.0
Apex 3.2 I have a field called P14_START_DATE.The display as type is Date Picker (DD.MM.YYYY). Now if the user uses the pop up calendar, the field is populated with eg 07.12.2013. I have 2 standard validations, not null and item specified is a valid date. If the user decides to type in the date, they can use a different format, eg 07/12/2013, which I do not want to happen.How can I validate the field, so they get an error if they do not use format dd.mm.yyyy.
I'm using Apex 4.2.1 against Oracle 11gR2 and mod_plsql.create a date picker item that allows users to select seconds as well as hours and minutes.
I have searched this Forum and see that others have asked this question. The answers have all been "No". However, I've seen no such question since version 4.1 has been released, and so, am hoping there now is a way to do this.
I have adjusted the Date Format field to be "DD-Mon-YYYY HH24:MI:SS", both under the date picker item itself as well as under the "Global" parameters section of my application. All to no avail. The date picker shows only hours and minutes for the time portion.
I have Dynamic report and column say some_date column and data can be in the columun (01-JAN-13) OR (01-JAN-13,04-JAN-13), (01-JAN-13,04-JAN-13,10-JAN-13) so on.
in actual table column some_date is date field but in report as above (string) because using RTRIM(some_date, ',') some_date within the select MODEL clause.
my problem is when run the report and select filter from action menu then it doesn't give option such as < , > or so on because of string but I want it should give <, <=, >, >= operators too as date column.
When I try to access the development environment of the apex or any other screen, this error occurs intermittently.These errors (ORA-01821: date format not recognized) and (ORA-02063: preceding line from) are related to existing dblink's.
Parameters from apex database:
SQL> select * from nls_instance_parameters; PARAMETER VALUE ------------------------------ ---------------------------------------- NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_SORT SPANISH NLS_DATE_LANGUAGE AMERICAN
[code]....
Parameters from dblink database:
SQL> SELECT * from NLS_instance_PARAMETERS;
PARAMETER VALUE ------------------------------ ---------------------------------------- NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_SORT SPANISH NLS_DATE_LANGUAGE
I have an IR report and want to add another column such as complete_date. I want to add as a link so when user click it then should display the popup window or javascript popup for date selection. i don't want to use apex_item.date_popup or apex_item.date_popup2. On date selection popup user can choose only two dates such as yesterday or today all other date should be disabled?
I have a table in which I extract the year and the month and both in combination (from a date type). This is needed to summarize for example the year in a chart.
I need the combination of month and year because people could do a query which switches through years. For expample: From 02.2012 to 03.2013.My problem is I dont know how to tell anychart to sort the dates. I have already tried:
to_number(to_char(testdate,'YYYY')) as Year, to_number(to_char(testdate,'YYYY'))||to_number(to_char(testdate,'MM')) as MonthyearApex now sorts:
In a detail tabular form I am referencing a date picker field from the master form as default value.This is the situation in the detail form:
TABULAR FORM Column Name: FECHAREGISTRO -- the field's name in the detail tabular form
Default Type: Item (application or page item name) Default: P68_FECHAREGISTRO -- It's a field in the master form and also is Date Picker format Reference Table Owner: SAMPEDRORIVEROS Reference Table Name: BITACORAABOGADO Reference Column Name: FECHAREGISTRO -- It's a date field in the database
At execution time I have the error:
report error:ORA-01790: expression must have same datatype as corresponding expression
I think it is because i must use to_date and to_char in order to change the datatype and i have tried using:
I am using the cloud version of APEX for a college course. The database script I am trying to load has dates formatted in "DD-MON-RR" and I receive 'not a valid month' and 'a non-numeric character was found where a numeric was expected'. Is there a workaround in APEX for this? I'm trying to avoid changing thousands of lines of data.
I have a calendar region based on a simple query from a table which has date and name columns. The calendar type is monthly with 3 buttons - previous, today & next. It works perfectly.
I have added a date picker in a calendar region now. If i choose any date, the calendar month should be refreshed accordingly. Ie... by default it would show July 2012 month. When i choose the month as March 2012 in the date picker, it should show March month data.
steps to achieve this report I need a Date Column on top of the page Depending on the selected date, Result should be displayed below for e.g.
suppose i select a date as 14-aug-2013
Enter Report Date ___________________ ( Date Picker) Location Name Report Date Quantity valueXYS 14/08/2013 5000 1200000ABCD 14/08/2013 2000 24000-------------------------------------------------------------------------------------------------TOTAL 7000 1224000
I'm using apex 4.1.1 And i want to use a Date Picker item on my page. This works, but.. When a user selects a date you can see the date highlighted. But in the "textarea"corresponding tot the datepicker is not showing the date. This shows the date after clicking the close button.
I would like to show the date directly after selecting a new date.
I have created a form with a Date From and Date To fields.
I am using the Date Picker format (the new one, not the Classic), and have set the calendar to Show on Both (Focus and Icon Click).
I would like to restrict the field so that the user cannot enter any text - they can only use the Date picker/calendar to choose a date. This would them remove the clunky validations - so I can restrict the users so they can't enter the wrong format in the first place.
I've started using Apex 4.2(new to Apex). I have built a form based on a table with a date column on it. The form allows update on all fields/columns of the base table. For the date field/column, the goal is to present the user with sysdate on load and update the date with sysdate if the record is changed any of the fields. How can I accomplish this?