How to convert a date field with format (dd,mm,yyyy) to format (mm,dd,yyyy)
Hello.
How to convert a date field with format (dd,mm,yyyy) to format (mm,dd,yyyy)
I have text field which has a databind to a date field. When I click on it, we can select the date, it is added on the format (dd,mm,yyyy). When I want to insert this date field to a database It doesnu2019t allow me to do it because it will only accept date field on the format (mm,dd,yyyy)
I tried to store this format on a date variable and I get a message saying that is impossible to convert a string into a date.
Regards,
Jose
Hi Jose,
usually you format strings in c# like
string.Format("{0:yyyyMMdd}", insertyourstring);
in your case
string.Format("{0:MM/dd/yyyy}", insertyourstring);
[look here|http://idunno.org/archive/2004/14/01/122.aspx]
there are more details
if everything fails split the string with Mid()
or ask me
lg David
Similar Messages
-
How to create a Date field with specific date limitations
Hello, im new to creating forms in Acrobat.
My question is, how do i create a date field and at the same time have a restriction on which dates to put.
ie; i want the date field to only enter dates from Jan 01 2015 - Dec 31 2015.
Thanks for your help.Thanks!
I tried and it worked.
but what are these numbers after the 2015?
var minDate = new Date(2015, 0, 1, 0, 0, 0, 0);
var maxDate = new Date(2015, 11, 31, 23, 59, 59, 999); -
How to insert/update Date field in Oracle with java code
Dear All
I have to insert/update a date column while creating a new item, but the problem is i am able to insert/update only date but i need both date and time along with AM/PM.
By using these 3 lines i am able to insert/update only date.
java.util.Date date = new java.util.Date();
long dateLong = date.getTime();
stmtPrep.setDate(33, new java.sql.Date(dateLong));
Below code retrives the date exactly what i need but unable to pass in the statement:
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss a");
java.util.Date d = (Date) new java.util.Date();
String stringdate = formatter.format(d);
String tmpdate = dateFormat();
stmtPrep.setString(33, tmpdate); -- I tried with setObject as well but same error coming.
Error is:
ORA-01830: date format picture ends before converting entire input string
Can u guide me how to get full date time with AM/PM?sasikrishna wrote:
Dear All
I have to insert/update a date column while creating a new item, but the problem is i am able to insert/update only date but i need both date and time along with AM/PM.
By using these 3 lines i am able to insert/update only date.
java.util.Date date = new java.util.Date();
long dateLong = date.getTime();
stmtPrep.setDate(33, new java.sql.Date(dateLong));That's by design. A java.sql.Date object matches an SQL DATE column (which doesn't include a time component). If you want something which matches an SQL TIMESTAMP colum (which includes both date and time components) then you should use a java.sql.Timestamp object. -
How to convert any date format?
Hi,
In the BPEL process I am getting the input in 'DD-MON-YYYY' format, I want to convert it to 'DD-MM-YYYY' format.
The function xp20:formatDateTime('string', 'image') expecting the string to be in 'YYYY-MM-DD' format. and the 'image' can be set to any format.
So i am able to convert to any format if I have the input string in 'YYYY-MM-DD' format, if I get in different format then how do I change them to required format?
--KhaleelLooks like you are sending the date in Oracle format. If the date is created by a DB adapter the date should be formated in the correct format for BPEL to format (YYYY-MM-DDTHH:MI:SS). To make sure this happensyour xml needs to be the date data type and the value sent maust be a date not a string, if it is a string use the to_date to make it a date field.
You are correct once it is in the YYYY-MM-DD format you can change to any format.
cheers
James -
How to convert siebel date to following format?
Hi,
How to convert siebel date to following format?
01-01-2011 5:00 AM (dd-mm-yyyy hh:mm AM)
01-JAN-2011 5:00 AM (dd-MON-yyyy hh:mm AM)
01/01/2011 5:00 AM (dd/mm/yyyy hh:mm AM)
Please suggest functions for conversion. Have tried few but didnt work.
Thanks.Excerpts from
http://bipconsulting.blogspot.com/2010/01/my-date-doesnt-like-me-with-siebel.html
".. the date data generated by Siebel with the IO is in ‘MM/DD/YYYY HH:MI:SS’ format, so it is something like ‘10/09/2008 05:31:13’. And BI Publisher doesn’t recognize that this is a date data because it’s not presented in the ‘Canonical’ format!.."
"...There are two possible and reasonable workarounds to overcome this issue. The first one is to use one of the Siebel’s extended function ‘totext()’ to convert the Siebel date format to the ‘Canonical’ date format before the BI Publisher’s date related function comes in..."
Please read on the above link to find out how to actually resolve this issue.
Good Luck
(please if this provides a solution for you grant the points and close this thread. Thanks!)
Jorge -
How to compare table's date field with dropdown year field
Hi All,
I have one requirement to display the selected rows from a database table based on the selection of drop down.
Here, I have one dropdown of year(like 2009,2010,....) and I have one database table which contains one field with "DATE".
Now, I want to compare table's DATE field with my dropdown field.
Problem is that table's DATE field is of type "DATS" and dropdown is of type INTEGER(or) STRING ...
How to compare this fields?
Can any one please give me solution for this...!
Thanks in Advance!Hi sreelakshmi.B,
try the following:
DATA lt_dats TYPE TABLE OF dats.
DATA l_dat_i TYPE i.
DATA l_dat_c_4(4) TYPE c.
DATA l_dat_c_12(12) TYPE c.
DATA l_dats_from TYPE dats.
DATA l_dats_to TYPE dats.
*Move Date from Integer to Char
l_dat_c_4 = l_dat_i = 2005.
*Create Date From use in WHERE-Clause
CONCATENATE '01.01.' l_dat_c_4 INTO l_dat_c_12.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = l_dat_c_12
IMPORTING
date_internal = l_dats_from
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*Create Date To use in WHERE-Clause
CONCATENATE '31.12.' l_dat_c_4 INTO l_dat_c_12.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = l_dat_c_12
IMPORTING
date_internal = l_dats_to
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
* Select records in range
SELECT *
FROM [DBTAB]
INTO TABLE [ITAB]
WHERE [DATE] BETWEEN l_dats_from
AND l_dats_to.
Regards
REA -
How to convert system Date into DD-MMM-YYYY Format
hi friends,
please help me How to convert system Date into DD-MMM-YYYY Format.
Regards
YogeshHI..
data: w_dt(11) type c,
w_month(2),
w_mon(3).
w_month = p_date+4(2). **p_date = given date**
case w_month.
when '01'.
w_mon = 'Jan'.
when '02'.
w_mon = 'Feb'.
when '03'.
w_mon = 'Mar'.
when '04'.
w_mon = 'Apr'.
when '05'.
w_mon = 'May'.
when '06'.
w_mon = 'Jun'.
when '07'.
w_mon = 'Jul'.
when '08'.
w_mon = 'Aug'.
when '09'.
w_mon = 'Sep'.
when '10'.
w_mon = 'Oct'.
when '11'.
w_mon = 'Nov'.
when '12'.
w_mon = 'Dec'.
endcase.
Now...
concatenate p_date6(2) '-' w_mon '-' p_date0(4) into w_dt.
write w_dt. -
How to convert CLOB data (now it is in html format) to Normal text format
Hi,
Can anybody let me know the solution for how to convert CLOB data into normal Text.In my case the table column having CLOB datatype and the data is in html format.when i run the report the column is displaying html tags .Now i need to convert that html tags into normal text.
Pl. let me know if any one know the solution.
Regards,
Thulasi.KLONG has been depricated since 8i so I don't believe there is a general solution to go backwards short of reloading the data.
Justin -
How to replace blank values in DATE field with 00000000
Hi
I have a DSO with Date field in which there are blank values. I want to replace the blank values in the DSO for date field with 00000000. Because of this blank values in the DSO the report is giving an ORA error.
How do we replace the blank values in the DSO for historical data and also the new loads?
Please advise.
Thank you.
Regards,
Pavan.Hi Suman,
I'm trying to run a query built on a DSO. The DSO has a field 'Start Date'. This Start Date InfoObject has a reference Char as 0DATE.
This Start Field has blank values due to which I'm getting the ORA-01722 error. I came across many threads with same topic of discussion. As mentioned in one of the Threads I have written a program to update 'Start Date' with 00000000. The code wriiten is "UPDATE /BIC/AZ_MONINV00 SET /BIC/ZSTR_DTE = '00000000' where /BIC/ZSTR_DTE = ' '.
Now when I see the data in the active data table of DSO the blank value is replaced with '00000000'.
But If I right click on the DSO click on display data the 'Start Date' field is blank. And now the Query also gets executed without any error. But in the output of the query the 'Start Date' Field has "#" values.
Can anyone suggest on how to remove these "#" values in the report? -
How to convert CLOB to BLOB with SQL Developer migration wizard?
Hi,
According to our requirement, we need to only migrate data from SQL Server 2008 to Oracle 11. I use the SQL Developer 3.0.04 migration wizard to do it.
I do migration from SQL Server (database name: SCDS41P2) to Oracle (User name: HCDS41P2).
My migration steps are as below: (I need to modify the target schema, so I add the steps 2) and step 3) )
1) Do migration by SQL Developer migration wizard;
2) Remove the Converted Database Objects node from migration project;
3) Re-do convert by SQL Developer migration wizard (contains changing the target schema);
When do step 1), the DBO_SCDS41P2 user is created automatically. CLOBTOBLOB_SQLDEVELOPER procedure is also created in this user.
I continued to run step 2) and step 3) with online mode. And find the table data which contains BLOB column can be moved into the target table. But from the Logging Page, I can't see the other detailed error info, so that I can't check which tables don't move data successfully.
Could you please tell me where the detail log file (e.g. contains every table's migration status) is if I use the online mode?
Additional, If I use offline mode to do step 3), I found the CLOB data can't be converted into BLOB automatically. Because in the load script (that is oracle_ctl.bat), only copy the source data to the CLOB column. After copy, it don't deal with the converting from CLOB to BLOB.
So could you please tell me how to convert CLOB to BLOB with offline mode?
Thanks so much.Hi,
For your first question about logging - after the migration there will be an entry in the right hand panel for the migration project. If you open this there are various fields that give information about the status of each part of the migration. Does this give you the information you need ?
For the second problem about offline moving blob data have a look at the SQL*Developer documentation -
Oracle® SQL Developer User’s Guide Release 3.0
in the section -
2.2.8.1.4 Populating the Destination Database Using the Data Files
which describes the problem and how to get round it.
Regards,
Mike
Edited by: mkirtley on Aug 12, 2011 10:49 AM -
How to convert a data set into a xml data and vice versa
i am new to oracle with xml..
my aim is to convert a data set into a xml data and vice versa..
my work is as follows...
my query:
select rggpk,rggcode,rggname from ms_regiongeo
to convert a data set into a xml*
select XMLType(trim(replace(dbms_xmlgen.getXML('select rggpk,rggcode, rggname from ms_regiongeo'),'<?xml version="1.0"?>',''))) XML_DATA from dual;
(this works fine and output of this query is as follows..)
<ROWSET>
<ROW>
<RGGPK>201</RGGPK>
<RGGCODE>Asia</RGGCODE>
<RGGNAME>Asia</RGGNAME>
</ROW>
<ROW>
<RGGPK>1</RGGPK>
<RGGCODE>OTH</RGGCODE>
<RGGNAME>Others</RGGNAME>
</ROW>
<ROW>
<RGGPK>21</RGGPK>
<RGGCODE>COB</RGGCODE>
<RGGNAME>Africa and Yemen</RGGNAME>
</ROW>
<ROW>
<RGGPK>2</RGGPK>
<RGGCODE>AUS</RGGCODE>
<RGGNAME>Australia</RGGNAME>
</ROW>
<ROW>
<RGGPK>23</RGGPK>
<RGGCODE>IND</RGGCODE>
<RGGNAME>Indian Sub Continent</RGGNAME>
</ROW>
<ROW>
<RGGPK>24</RGGPK>
<RGGCODE>TVM</RGGCODE>
<RGGNAME>North America</RGGNAME>
</ROW>
</ROWSET>
and to reverse this process, I tried a query like this..*
select EXTRACTVALUE (XML_DATA,'ROWSET/ROW/RGGPK') as EMP_ID
from(
select XMLType(trim(replace(dbms_xmlgen.getXML('select rggpk,rggcode, rggname from ms_regiongeo'),'<?xml version="1.0"?>',''))) XML_DATA from dual
)tab1but failed.. and raised with an eror: ORA-19025
help me..
regards,
johnHi-
my aim is to convert a data set into a xml data You can refer to the below posts
Adding namespace to XML output
Re: how to convert table data in xml format based on the xsd. -
How can I have two fields with the same name if it makes sense?
Hello, folks :)
I have a pretty hard time figuring out how I can have two text fields with the same binding name.
The whole problem is that when I need two fields with the same binding name they are still differnent coz they have the same name but differnt indices.
I should make a form filled at runtime by merging a pdf form file and an fdf file data file. And I have no choice to do it differently. And my form file needs some data like customerName, companyName twice in one form. But there's only one possible buinding name indexed zero.
How can I create a field with absolutely the same name or is it just impossible due to possible name conflicts? And is there a workaround to this problem? I just need one piece of data repeated in different places.
Thanks for your replies :)
P.S. if u think that the problem is not clear enough let me know. I'll supply you with more details. But the general process can not be changed.
One pdf should be mergred with an fdf with as the result of their merge a new filled and flattened form. I have no control over fdfs their are generated by Oracle and I can not fill the form using XML files coz this process should be integrated in a working application.I just thought about a really ugly workaround with a server-side script adding values to fdf files but it's a bit of work and tests and personally i think it's a bad idea :-(
-
How to Map Proces form field with Resource form field?
Hi,
How to Map Proces form field with Resource form field while creating Process form in Form designerAre you talking about Provisioning ?
then you do that in Data Flow under Process Defintion in OIM 10g
In OIM 11g you use Request Dataset. In that you can directly map fields to process form. -
How to convert julian Date into Calendar Date
Hi,
I want convert julian Date to calendar Date (mm/dd/yyyy or mm/dd/yy format) in java.
Can any one help me how to convert julian date to calendar Date.
Thanks,
Krishore.import java.util.*;
import java.text.*;
public class jdate {
Calendar date;
public jdate(int j)
date = Calendar.getInstance();
date.set(Calendar.DAY_OF_YEAR, j);
public String toString()
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
return (formatter.format( date.getTime() ));
public static void main(String args[])
if(args.length == 1)
int j = Integer.parseInt(args[0]);
jdate julian = new jdate(j);
System.out.println("Julian date(" + j + ") = " + julian.toString());
} -
How to set the data fields column wide at sqlplus
Dear Sir/Madam
I would like to know how to set the data fields column wide at sqlplus
Thanks
Francissee
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch6.htm#sthref1131
and the FORMAT clause of the COLUMN command in
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12013.htm#BACHCABF
Maybe you are looking for
-
Memory upgrade on Satellite A50-104
I NEED TO FIND A 512MB MEMORY UPGRADE FOR MY A50/104 ANYONE NO THE CORRECT ONE TO BUY, I WAS TOLD ON EBAY THAT 512 DDR SODIMM IS THIS RIGHT. ALSO HOW DO I CHECK ON MY LAPTOP FOR THESE DETAILS IF THERE ARE ANY AND ANY OTHER SPEC BATTERY ,HARDDRIVE ETC
-
Hi friends, In the tcode F-02 if we give future document date it will give information message ---check-document date is in the future.How to change it into error message? This is urgent... Plz help.
-
Problem: Windows failed to start. A recent hardware or software change might be the cause 1) Insert your Windows installation disk and restart your computer File : \Boot\BCD Status : 0xc0000098 Info : The Windows Boot Configuration Data file doe
-
My Macbook Pro won't boot up, only in safe mode!
Help, my macbook pro won't restart, only in safe mode! and it seems that safe mode has plenty of implications for use. my usb memory stick doesn't seem to be recognized while in safe mode. I was doing a cleanup on mackeeper just after I downloaded
-
Hi Trigger: Customer invoice e-mail functionality may be triggered by Sales administrators or Accounts Receivable staff, to facilitate the correspondence of goods that was sold. Financial Statements e-mail functionality may be triggered by Financial