Create unique Form ID - Help on Date Format in Concat
I am having problems formating a date value in my concat statement. I have tried to write is different ways and still can't seem to get the string correct.
Ideally, I would like to change the date value to a Julian value for the form ID, but I would settle for just mmddyy value without the / or - in between.
Codes I have tried w/out date format string
JavaScript - Calculate
Program.FormID.rawValue=Program.State.rawValue + Program.ProgramNumber.rawValue + Program.ProgramDate.formattedValue;
Returns - MO1234Jul8,2010
-------------And--------------------
Program.FormID.rawValue=Program.State.rawValue + Program.ProgramNumber.rawValue + Program.ProgramDate.rawValue;
Returns - MO12342010-07-08
FormCalc - Calculate
(This one has the current date as a value, but it changes the unique form ID when reopened on another day, that is why I am using ProgramDate)
Concat(Date2Num(Date(), "ddmmyyy"),Program.State.rawValue, Program.ProgramNumber.rawValue)
Returns - 0MO1234
----------- And --------------------
if
(Program.ProgramNumber.rawValue ne null) then
$.rawValue
= CONCAT(Program.State.rawValue, Program.ProgramNumber.rawValue, Program.ProgramDate.formattedValue)
else
$.rawValue = ""
endif
Returns - MO1234July8,2010 (formattedValue)
MO12342010-07-08 (rawValue)
What would be the better language to use, FormCalc or JavaScript for this example?
I am not all that skilled at coding and use forums like this to help me, so I appreciate any help.
Thanks in advance - Eve
Date.prototype.yyyymmdd = function() {
var yyyy = this.getFullYear().toString();
var mm = (this.getMonth()+1).toString(); // getMonth() is zero-based
var dd = this.getDate().toString();
return yyyy + (mm[1]?mm:"0"+mm[0]) + (dd[1]?dd:"0"+dd[0]); // padding
Now, after having spliced the internal Date object, you can do this:
d = new Date();
d.yyyymmdd();
The line above returns today's date: "20100709".
Similar Messages
-
Need help at date format while creating External Tables from Flat file
Hi All,
I have a flat file generated from SQL Server 2005. In that generated flat file the date format is in the format as "YYYY-MM-DD HH24:MI:SS.Millisec" like example "2007-09-08 13:32:36.568".
My task is I have to load this flat file data into Oracle database table running on 9i, but its failing at the creation of external table itself because of this date format. The target table in Oracle the date column data type is "date" only not the "TIMESTAMP".
Can any body suggest how to resolve this?
Thanks,
SankarOr:
SQL> select cast(to_timestamp('2007-09-08 13:32:36.568',
2 'yyyy-mm-dd hh24:mi:ss.xff') as date) dt
3 from dual;
DT
08-SEP-07 -
Hi, I have a record update form that shows Start date and End date in 2 separate fields like dd/mm/yyyy. When I edit the dates they do not get to the database correctly, all I get is 0000/00/00. I guess this is because the date format accepted by MySQL is yyyy/mm/dd.
I'm stuck because I don't know how to convert the dates back to MySQL format for updating.
This is the code that displays the start date:
//<input name="AG_fechai" type="text" class="CP_loginFormFields" value="<?php echo date('d/m/Y',strtotime($row_eventosUpdate_RS['AG_fechai'])); ?>" size="32" />
This is the code that displays the end date:
//<input name="AG_fechaf" type="text" class="CP_loginFormFields" value="<?php echo date('d/m/Y',strtotime($row_eventosUpdate_RS['AG_fechaf'])); ?>" size="32" />
This is my update query.(AG_fechai and AG_fechaf are the start and end date fields) which are not been updated. I appreciate your help. Thanks.
// $updateSQL = sprintf("UPDATE t_agenda SET AG_fechai=%s, AG_fechaf=%s, AG_precio=%s, AG_horario=%s, AG_titulo_esp=%s, AG_titulo_eng=%s, AG_titulo_ger=%s, AG_titulo_fra=%s WHERE id_AG=%s",
GetSQLValueString($_POST['AG_fechai'], "date",
GetSQLValueString($_POST['AG_fechaf'], "date",
GetSQLValueString($_POST['AG_precio'], "text",
GetSQLValueString($_POST['AG_horario'], "text",
GetSQLValueString($_POST['AG_titulo_esp'], "text",
GetSQLValueString($_POST['AG_titulo_eng'], "text",
GetSQLValueString($_POST['AG_titulo_ger'], "text",
GetSQLValueString($_POST['AG_titulo_fra'], "text",
GetSQLValueString($_POST['id_AG'], "int");
mysql_select_db($database_amat_connect, $amat_connect);
$Result1 = mysql_query($updateSQL, $amat_connect) or die(mysql_error());MySQL stores dates in one format only: the ISO recommended YYYY-MM-DD. You need to reorder the date parts to store the date correctly.
If your input date is in the following format: dd/mm/yyyy, you can convert it by creating a custom function like this:
function convertDate($val) {
$parts = explode('/', $val);
return "$parts[2]-$parts[1]-$parts[0]";
Pass both dates to this function:
GetSQLValueString(convertDate($_POST['AG_fechai']), "date",
GetSQLValueString(convertDate($_POST['AG_fechaf']), "date", -
Help in date format for transaction F-01
Hello Experts,
I am currently modifying a report wherein it posts document using
transaction F-01. Now, I am getting an error wherein it says:
Direct input date: Date 04162007 is incorrect. The document has not
been created.
Now, how can I modify it in such a way that whatever format of the date is,
it will be correctly translated to the proper format for F-01. For example,
in my selection screen i enter it as 16.04.2007 and other users enter it as
04/16/2007. Hope you can help me out here guys. Thank you and take care!Hai,
You can enter any date format.
But you have to validate the date format.
The date format depends on the settings.
The format code can be known by the <b>USR01</b> with <b>DATFM</b> field.
So<b> select</b> that field value.
<b>Depending</b> on that type(1 to 6)
write your conversion code like:
Case date_code.
when 1.
do convwersion here.
when 2.
when 6.
do convwersion here
endcase.
Hope now you can do with any date format.
<b>Reward points if it helps you.</b>
Regds,
Rama chary.Pammi -
Need help with date format mask
Hi there, right now I'm trying to set a default date format mask constraint for one of the attributes for my table. I want to set the default mask constraint as MM/DD/YY but I don't know how to. it should be something like:
CREATE TABLE work (WorkDate DATE CHECK (WorkDate = 'MM/DD/YY'))
or something like that, but I don't think that's correct. Can anyone help me? Thanks in advance.What you want (and should have done) is to read the documentation, starting with the concepts:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#CNCPT413
http://www.oracle.com/pls/db102/search?remark=quick_search&word=date&tab_id=&format=ranked
A date is stored as, well, a date, format masks only come into play when you're selecting/retrieving a date or when you want to store a string as a date. Default date formats can be set through NLS_DATE_FORMAT at session and database level.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams122.htm#REFRN10119
Documentation homes (from which you can do a simple quick search):
http://www.oracle.com/pls/db102/homepage
http://www.oracle.com/pls/db112/homepage
Bottom line:
Trying to set a default date format mask on a date datatype column makes no sense... -
Hi all,
I got the column in table A where the date format is dd/mm/yyyy ( 01/03/2005), and another table B where the date format is dd/mm/yyyy HH24:MI:SS. So in order to let the two table to talk to each other, I hv the following query
B.transaction_date >= TO_DATE(A.start_date , 'DD-MON-RRRR HH24:MI:SS')
B.transaction_date <= TO_DATE(A.end_date, 'DD-MON-RRRR HH24:MI:SS')
I hv problem with the end result b'cos of the date format in table A is dd/mm/yyyy whereas the transaction_date in table B has the format with time. How can I format or convert the date in the table B to be in defaulted time such as A.start_date 00:00:00 and b.end_date 23:59:59 ??
How to format this ? please helps. Thanks
Rgds
LimHello
Are the transaction_date, start_date and end_date columns all DATE data types?
If so, all DATE columns have the time component but it may be truncated i.e. set to 00:00:00. To do a date range in your case you could do something like:
B.transaction_date >= A.start_date
AND
B.transaction_date < A.end_date + 1By using this construct you are forming a range between today at midnight and tonight at 23:59:59, so you don't have to worry about setting the time component on your end_date.
HTH -
Help with date formatting.
Hi,
I have been asked to fix a problem with a report. I have found that the problem is the date format being passed to the stored procedure is not correct, The current format is like Mon April 04 2007. The correct format should be DD-MMM-YYYY which I take to be Mon Apr 04 2004. I am not sure if this is correct anyway, but after looking at the code and the api I have managed to create a date object and call toString on it, after setting a simple date format to dd MMM yyyy.
The problem is that the toString method returns Mon Apr 02 00:00:00 BST 20
07. Is anybody able to help me with this? Below is a little bit of the code:
public void renderDailyReport(ServletWriter out, HttpServletRequest request) throws Exception {
// reset counters
totalHits = 0;
maxHits = 0;
minHits = 0;
// get a GregorianCalendar object using the startDate and endDate Strings
SimpleDateFormat sdf = new SimpleDateFormat("dd MMMM yyyy", Locale.UK);
SimpleDateFormat procedureDateFormat = new SimpleDateFormat("dd MMM yyyy", Locale.UK);
GregorianCalendar dateCounter = new GregorianCalendar();
GregorianCalendar upperLimit = new GregorianCalendar();
sdf.setCalendar(Calendar.getInstance());
Date sd = sdf.parse(startDate);
Date ed = sdf.parse(endDate);
procStartDate = procedureDateFormat.parse(startDate);
procEndDate = procedureDateFormat.parse(endDate);The procStart and end dates are the bits that I added.
They are passed to the stored procedure calling .toString, they are date objects.
Appreciate any help.Do not use the toString() method of Date - it will always be the same format.
Use the format() method of SimpleDateFormat.
Date d = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("'dd-MMM-yyyy"); // or something like this
String s = sdf.format(d);Message was edited by:
jbish -
Pls Help with date format picture ends ......error
Hi Everyone,
I am getting the following error when I run my crystal report.
Failed to retrieve data from the database.
Details: HY000:[DataDirect][ODBC Oracle driver][Oracle]ORA-01830: date format picture ends before converting entire input string
[Database Vendor Code: 1830]
I am using SQL Command for my report and in the command my date fields are of "Date" datatype.
I am using Crystal Reports XI R2,driver - CR Oracle ODBC Driver 5.1
Any help is greatly appreciated.
Thanks in advance
My SQL Command is as follows:
<
with MAXNEWSTAT as
(select
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE,
MAX(HRHISTORY.ACT_OBJ_ID) ACT_OBJ_ID
FROM
LAWSON.HRHISTORY
WHERE
HRHISTORY.FLD_NBR=20
and TO_DATE(HRHISTORY.DATE_STAMP)
>= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD')
AND TO_DATE(HRHISTORY.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
/--Added by HAN--/
GROUP BY COMPANY,
EMPLOYEE),
NEWSTAT AS
(SELECT
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE,
HRHISTORY.A_VALUE,
HRHISTORY.DATE_STAMP,
HRHISTORY.BEG_DATE,
HRHISTORY.ACT_OBJ_ID NS_OBJ_ID,
HRHISTORY.SEQ_NBR
FROM
LAWSON.HRHISTORY
INNER JOIN LAWSON.MAXNEWSTAT
ON
/--Added by HAN--/
HRHISTORY.COMPANY = MAXNEWSTAT.COMPANY
/--Added by KAM--/
AND HRHISTORY.EMPLOYEE = MAXNEWSTAT.EMPLOYEE
AND HRHISTORY.ACT_OBJ_ID = MAXNEWSTAT.ACT_OBJ_ID
WHERE
HRHISTORY.FLD_NBR=20
and TO_DATE(HRHISTORY.DATE_STAMP)
>= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD')
AND TO_DATE(HRHISTORY.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
PREVSTATID AS
(SELECT
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE,
MAX(HRHISTORY.ACT_OBJ_ID)OBJ_ID
FROM
LAWSON.HRHISTORY
INNER JOIN LAWSON.NEWSTAT
/--Added by HAN--/
ON HRHISTORY.COMPANY = NEWSTAT.COMPANY
AND HRHISTORY.EMPLOYEE = NEWSTAT.EMPLOYEE
WHERE
HRHISTORY.FLD_NBR=20
AND TO_DATE(HRHISTORY.BEG_DATE)
< to_date(NEWSTAT.BEG_DATE)
GROUP BY
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE
PREVSTAT AS
(SELECT
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE,
HRHISTORY.A_VALUE A_VALUE,
HRHISTORY.DATE_STAMP DATE_STAMP,
HRHISTORY.BEG_DATE BEG_DATE,
HRHISTORY.ACT_OBJ_ID OBJ_ID,
HRHISTORY.SEQ_NBR SEQ_NBR
FROM
LAWSON.HRHISTORY
INNER JOIN LAWSON.PREVSTATID
/--Added by HAN--/
ON HRHISTORY.COMPANY = PREVSTATID.COMPANY
AND HRHISTORY.EMPLOYEE = PREVSTATID.EMPLOYEE
WHERE
HRHISTORY.FLD_NBR=20 AND
HRHISTORY.ACT_OBJ_ID = PREVSTATID.OBJ_ID
MAXPERSACTHST AS
(SELECT
PERSACTHST.EMPLOYEE,
/--Added by KAM--/
PERSACTHST.COMPANY,
MAX(PERSACTHST.DATE_STAMP)DATE_STAMP
FROM
LAWSON.PERSACTHST
WHERE
(PERSACTHST.ACTION_CODE='LOASTATUS' OR PERSACTHST.ACTION_CODE='STATUS')
AND TO_DATE(PERSACTHST.DATE_STAMP)
>= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD')
AND TO_DATE(PERSACTHST.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
GROUP BY PERSACTHST.EMPLOYEE,
/--Added by KAM--/
PERSACTHST.COMPANY
CHANGELIST AS
(SELECT
PERSACTHST.EMPLOYEE,
/--Added by KAM--/
PERSACTHST.COMPANY,
PERSACTHST.ACTION_CODE,
PERSACTHST.REASON_01,
PERSACTHST.DATE_STAMP,
PERSACTHST.EFFECT_DATE,
PERSACTHST.REASON_02,
PREVSTAT.A_VALUE PS_A_VALUE,
PREVSTAT.DATE_STAMP PS_HR_DATE_STAMP,
PREVSTAT.BEG_DATE PS_HR_BEG_DATE,
PREVSTAT.OBJ_ID PS_HR_OBJ_ID,
PREVSTAT.SEQ_NBR PS_HR_SEQ_ID,
NEWSTAT.A_VALUE NS_A_VALUE,
NEWSTAT.DATE_STAMP NS_DATE_STAMP,
NEWSTAT.BEG_DATE NS_BEG_DATE,
NEWSTAT.NS_OBJ_ID,
NEWSTAT.SEQ_NBR NS_SEQ_NBR
FROM
LAWSON.PERSACTHST PERSACTHST
INNER JOIN LAWSON.PREVSTAT
ON PERSACTHST.EMPLOYEE=PREVSTAT.EMPLOYEE
/--Added by KAM--/
AND PERSACTHST.COMPANY = PREVSTAT.COMPANY
INNER JOIN LAWSON.NEWSTAT
ON PERSACTHST.EMPLOYEE = NEWSTAT.EMPLOYEE
/--Added by KAM--/
AND PERSACTHST.COMPANY = NEWSTAT.COMPANY
INNER JOIN LAWSON.MAXPERSACTHST
ON PERSACTHST.EMPLOYEE = MAXPERSACTHST.EMPLOYEE
/--Added by KAM--/
AND PERSACTHST.COMPANY = MAXPERSACTHST.COMPANY
WHERE
(PERSACTHST.ACTION_CODE='LOASTATUS' OR PERSACTHST.ACTION_CODE='STATUS')
AND NEWSTAT.A_VALUE <> PREVSTAT.A_VALUE
AND MAXPERSACTHST.DATE_STAMP = PERSACTHST.DATE_STAMP
PAEMPPOSENDDATE AS
(SELECT
PAEMPPOS.EMPLOYEE,
PAEMPPOS.COMPANY,
CASE
WHEN PAEMPPOS.END_DATE = TO_DATE('1700,01,01','YYYY,MM,DD')
THEN to_date(SYSDATE + 1,'YYYY,MM,DD')
ELSE PAEMPPOS.END_DATE
END END_DATE,
PAEMPPOS.EFFECT_DATE
FROM LAWSON.PAEMPPOS),
CURRFTE AS
(SELECT
PAEMPPOS.EMPLOYEE,
/--Added by KAM--/
PAEMPPOS.COMPANY,
PAEMPPOS.FTE CURR_FTE,
PAEMPPOS.EFFECT_DATE,
PAEMPPOSENDDATE.END_DATE
FROM
LAWSON.PAEMPPOS
INNER JOIN LAWSON.NEWSTAT
ON (PAEMPPOS.EMPLOYEE = NEWSTAT.EMPLOYEE)
/--Added by KAM--/
AND (PAEMPPOS.COMPANY = NEWSTAT.COMPANY)
INNER JOIN LAWSON.PAEMPPOSENDDATE
ON PAEMPPOS.EMPLOYEE = PAEMPPOSENDDATE.EMPLOYEE
/--Added by KAM--/
AND PAEMPPOS.COMPANY = PAEMPPOSENDDATE.COMPANY
AND PAEMPPOS.EFFECT_DATE=PAEMPPOSENDDATE.EFFECT_DATE
WHERE
(PAEMPPOSENDDATE.EFFECT_DATE <= NEWSTAT.BEG_DATE AND PAEMPPOSENDDATE.END_DATE >= NEWSTAT.BEG_DATE)
PREVFTE AS
(SELECT
PAEMPPOS.EMPLOYEE,
/--Added by KAM--/
PAEMPPOS.COMPANY,
PAEMPPOS.FTE PREV_FTE,
PAEMPPOSENDDATE.END_DATE
FROM
LAWSON.PAEMPPOS
INNER JOIN LAWSON.NEWSTAT
ON (PAEMPPOS.EMPLOYEE = NEWSTAT.EMPLOYEE)
/--Added by KAM--/
AND (PAEMPPOS.COMPANY = NEWSTAT.EMPLOYEE)
INNER JOIN LAWSON.PAEMPPOSENDDATE
ON (PAEMPPOS.EMPLOYEE = PAEMPPOSENDDATE.EMPLOYEE)
/--Added by KAM--/
AND (PAEMPPOS.COMPANY = PAEMPPOSENDDATE.COMPANY)
AND (PAEMPPOS.EFFECT_DATE = PAEMPPOSENDDATE.EFFECT_DATE)
WHERE
PAEMPPOS.EFFECT_DATE <= (NEWSTAT.BEG_DATE-1)AND PAEMPPOSENDDATE.END_DATE >= (NEWSTAT.BEG_DATE -1)
SELECT DISTINCT
EMPLOYEE.EMPLOYEE,
EMPLOYEE.DEPARTMENT,
EMPLOYEE.PROCESS_LEVEL,
EMPLOYEE.EMP_STATUS,
EMPLOYEE.FIRST_NAME,
EMPLOYEE.LAST_NAME,
EMPLOYEE.MIDDLE_INIT,
EMPLOYEE.POSITION,
PAPOSITION.DESCRIPTION,
CHANGELIST.PS_A_VALUE,
/--Added by KAM--/
CHANGELIST.COMPANY,
CHANGELIST.PS_HR_DATE_STAMP,
CHANGELIST.PS_HR_BEG_DATE,
CHANGELIST.PS_HR_OBJ_ID,
CHANGELIST.NS_A_VALUE,
CHANGELIST.NS_DATE_STAMP,
CHANGELIST.NS_OBJ_ID,
CHANGELIST.ACTION_CODE,
CHANGELIST.REASON_01,
CHANGELIST.REASON_02,
CHANGELIST.DATE_STAMP PERSACTSDATESTAMP,
CHANGELIST.EFFECT_DATE PERSACTEFFDATE,
DEPTCODE.R_NAME DEPTNAME,
PRSYSTEM.R_NAME PLNAME,
PREVFTE.PREV_FTE,
CURRFTE.CURR_FTE,
CHANGELIST.NS_BEG_DATE,
PGSELECT.GROUP_NAME,
PAEMPLOYEE.SENIOR_DATE
FROM
LAWSON.CHANGELIST
INNER JOIN LAWSON.EMPLOYEE
ON (EMPLOYEE.EMPLOYEE = CHANGELIST.EMPLOYEE)
/--Added by KAM--/
AND (EMPLOYEE.COMPANY = CHANGELIST.COMPANY)
INNER JOIN LAWSON.DEPTCODE
ON ((EMPLOYEE.COMPANY=DEPTCODE.COMPANY)
AND (EMPLOYEE.PROCESS_LEVEL=DEPTCODE.PROCESS_LEVEL)
AND (EMPLOYEE.DEPARTMENT=DEPTCODE.DEPARTMENT))
INNER JOIN LAWSON.PRSYSTEM
ON ((EMPLOYEE.COMPANY=PRSYSTEM.COMPANY)
AND(EMPLOYEE.PROCESS_LEVEL=PRSYSTEM.PROCESS_LEVEL))
LEFT OUTER JOIN LAWSON.PREVFTE
ON (CHANGELIST.EMPLOYEE=PREVFTE.EMPLOYEE)
/--Added by KAM--/
AND (CHANGELIST.COMPANY=PREVFTE.COMPANY)
LEFT OUTER JOIN LAWSON.CURRFTE
ON (CHANGELIST.EMPLOYEE=CURRFTE.EMPLOYEE)
/--Added by KAM--/
AND (CHANGELIST.COMPANY=CURRFTE.COMPANY)
INNER JOIN LAWSON.PGSELECT PGSELECT
ON ((EMPLOYEE.COMPANY=PGSELECT.COMPANY)
AND (EMPLOYEE.EMP_STATUS=PGSELECT.BEGIN_VALUE))
LEFT OUTER JOIN LAWSON.PAPOSITION
ON (EMPLOYEE.POSITION=PAPOSITION.POSITION)
AND (EMPLOYEE.COMPANY=PAPOSITION.COMPANY)
INNER JOIN LAWSON.PAEMPLOYEE
ON (CHANGELIST.EMPLOYEE=PAEMPLOYEE.EMPLOYEE)
/--Added by KAM--/
AND (CHANGELIST.COMPANY=PAEMPLOYEE.COMPANY)
WHERE
(PGSELECT.GROUP_NAME='G:ACTIVE' OR PGSELECT.GROUP_NAME='G:INACTIVE')
>Hi Arsh,
The error message you receive i.e.
ORA-01830: date format picture ends before converting entire input string
is an Oracle error.
The following document would be helpful:
ORA-01830: date format picture ends before converting entire input string
Cause: A valid date format picture included extra data. The first part of the format picture was converted into a valid date, but the remaining data was not required.
Action: Check the specifications for date format pictures and correct the statement.
Regards,
Alpana -
Help by date format in UIX/XML
In UIX/XML I would like to indicate the date fields in the format to 'DD.MM.YYYY '. I modify the properties of my view object and entity object in the window "structure window". It does not change view for anything.
What wrong do I make?
Who can help me please !!!!Please post what version of JDeveloper you are using. Also post a small sample application that shows what you are trying to do.
I am not sure what you mean. Are you trying to display a date from the database, or have the user enter a date?
The date format is determined from the client browser locale. It will default to the US date format mm/dd/yy unless the browser locale is overridden.
If you want the user to enter a date, you should be using <dateField>. This will also expect mm/dd/yy unless you override it with a validater. Please refer to the UIX Element Reference. This documents <dateField>. The <onSubmitValidater> is a child of <dateField>, it is also documented in the Element Reference. <date> is the validater you want, it is a child of <onSubmitValidater>. You can specify a validation pattern. -
Hi
I am a complete oracle idiot.
I have created a table with 2 columns po_id,po_date. Yhe id data type is number,date type is date. To add values to the table i enter something like
"insert into purchase_orders(po_id,po_date) values(1,01/01/2004)"
It does not accept the date and will not add the record, i have also tried the date format 01-Jan-2004.
What is the proper way to add the date.
Thanks
GarryYou probably want to use an explicit to_date cast. That lets you specify the format of the date string, i.e.
INSERT INTO purchase_orders( po_id, po_date )
VALUES( 1, to_date( '01/01/2004', 'DD/MM/YYYY' );Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Required help with date format
Hi All,
I am calling a webservice from plsql, for this I am using UTL_DBWS package. I want to insert the format of date as 'YYYY-MM-DD' only. I used to_char(sysdate, 'YYYY-MM-DD') , but it is throwing error. Please suggest any solution.
Thanks and Regards,
Mahesh
The error details are as follows
ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException
Caught exception while handling request: invalid date: 25-NOV-08
ORA-06512: at "SYS.UTL_DBWS", line 403
ORA-06512: at "SYS.UTL_DBWS", line 400user6391695 wrote:
Hi All,
I am calling a webservice from plsql, for this I am using UTL_DBWS package. I want to insert the format of date as 'YYYY-MM-DD' only. I used to_char(sysdate, 'YYYY-MM-DD') , but it is throwing error. Please suggest any solution.What happens is...
You convert sysdate into a string of the format YYYY-MM-DD and then you are passing that to a parameter that is a DATE datatype. When you do this oracle has to implicitly conver the string to the DATE datatype. It does this based on the NLS settings of the session which, I would guess, are not of the format YYYY-MM-DD, so it can't understand the string you have passed and fails to convert it to a date.
Date formats are not something that is stored on the database (assuming you are correctly storing dates as DATE datatype). The format of dates is a display issue and something that should be handled by the user interface. The database stores data, just that, no display formats. ;) -
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 -
Need Help on Date Format in Apps
Hi,
I am getting error message ORA-01861:literal does not match format string.
My concurrent program has 5 parameters. one of this is Date datatype. I have attached FND_STANDARD_DATE value set for that parameter.
when i submit the concurrent program, i am getting the above error.
I wrote like this query in cursor declaration
SELECT * FROM <TABLE>
WHERE <COLUMN.DATE datatype,'DD/MM/YYYY'>(Retieving Database) = <PARAMETER.DATE.datatype,'RRRR/MM/DD'>(this is fnd_standard_date)
Please any one guide me to solve above qurery.
Thanks in advancehi
i have similar to above thing
i solved when i have to pass date value to pl/sql procedure that is in fnd_standard_date (yyyy/mm/dd hh24mi ss) format vice versa now i want to pass value from
program paramter form value type as sql statment and default value as select func(sysdate) from dual
i want to know that sysdate is what format is it same fnd_standard_date (but i tried it is showning APP-FND-01564: ORACLE error 904 in FDFGDF)
i tried lot of thing no solution
please help me
in this regard
thankd in advance .... -
Create Tabular Form On Non Tabular Data
Hi,
I'm not sure if this is possible.
We have an existing process the project manager enters the users time again projects this i done row by row so the results are
User Project Wk Hrs
A 1 1 8
A 1 2 4
A 1 3 3
A 1 4 1
B 1 2 5
B 1 3 2
D 1 1 7
D 1 3 8
I dont want to change the existing table structure as this is used by other preorts but I would like to change the data entry form to something like this
Project 1
Wk1 Wk2 Wk3 Wk4
User A 8 4 3 1
User B 5 2
User C
User D 7 8
Any idea how best I could achieve this, all ideas would be appreciated?
ThanksHi Andy,
you'd need an updateable pivot table (crosstab) - there is no out-of-the-box solution for this ... but a combination of existing how tos will do the trick.
First: generate the crosstab (as an APEX report):
Crosstables (Pivot tables) with SQL ...
Second: Create a tabular form on the crosstab report manually:
http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html
I have a german how to which explains the full process - even if you don't understand german the embedded code might help you ...
http://www.oracle.com/global/de/community/tipps/kreuztabelle-edit/index.html
Best regards
-Carsten -
How to create Infopath form that auto populate data from one list to be fill by another user?
hi. I would like to ask, how to create form that fill by User A, for example, and then the User A assigned task to User B to complete the form. Next, the form will be approved by approver. May I know how to do
that? and if possible, I do not want to use any programming code.
Azuaniza AriffinHi,
If your SharePoint environment supports InfoPath Forms, then you can customize the form and add rules to make the list items as read only when user A submits the form.
you can then write a form load event to check the logged in user using username() function. This logic can be implemented in variety of ways, like setting a flag when User A submits the form, or storing user A username in a form variable etc., else comparing
User A and User B values within form Load event.
Another way of doing this is using Views or grouping all of the User A fields within a section etc.,
The above would take care of Form logic, and for the workflow, you can use SharePoint designer to create a custom workflow, where it will run on onItemCreate and onItemChange events.
The logic for workflow would be if the form Submitted for the first time, the workflow will start and send an email to User B, and when User B submits the Data then onItemChange change event will start the workflow to send an email to approver to approve
the data.
here are some links for your reference -
http://office.microsoft.com/en-us/infopath-help/add-formulas-and-functions-in-infopath-2010-HA101821255.aspx
http://office.microsoft.com/en-us/videos/video-create-an-approval-workflow-in-sharepoint-designer-2010-VA101897477.aspx
http://blogs.technet.com/b/meacoex/archive/2010/11/01/get-manager-approval-in-sharepoint-designer-2010-step-by-step.aspx
Hope this helps!
Ram - SharePoint Architect
Blog - SharePointDeveloper.in
Please vote or mark your question answered, if my reply helps you
Maybe you are looking for
-
Why are all of the gif animations on my webpage running on a "continuous" animation loop?
each of my webpages is designed with a .gif image that play's its set of frames one time for the user to see a single animation with the loading of the page. after i was automatically updated with firefox 4 latest update this morning, i checked my we
-
How to remove duplicate amount in report
Hello, I created PO wise details and my layout is VENDOR CODE VENDOR NAME PURCHASE DOC. PURCHASE AMOUNT PURCHASE DATE INVOICE NUMBER INVOICE DATE INVOICE AMOUNT PAYMENT NUMBER PAYMENT DATE PAYMENT AMOUNT In my output payment amount is repeting for sa
-
Doesn't work on Cross Trainer?
Does anyone knows why it does not work on the cross trainer? the ones you step on to the steps and run like you are running in mid air? The moment i get down and start walking or on a treadmill, it works perfectly fine. Its so disappointing to see th
-
ITunes Error Message required files are missing - can't run
Plugged my iPod Nano in and my iTunes gives error "iTunes cannot run because some of its required files are missing. Please reinstall iTunes". Tried to reinstall iTunes and get same error.
-
I am using a mifi device 4g for internet connection and it seems to always hang on the macbook on other devices such as a mobile or tablet it seems fine....and the connection is consistent, however on the MB it is intermittent. sometimes it works for