Extracting date without time from getObject() result

I use following code to get the date from sql table, which uses object types:
oracle.sql.STRUCT os = (oracle.sql.STRUCT)rset.getObject (1);
Object a[] = os.getAttributes();
columns.addElement(a[0]);
I am getting both date and time. What can I do to extract only date from it?
Thanks in advace,
Kasia

you can use SimpleDateFormat .. check the Java API for the formats.

Similar Messages

  • How to extract  the date n time from images

    can anybody help me...what function/ method that i can use to extract the date an time from images
    thanks

    Hi norazanita,
    Please give clear idea what you want so one can proceed.
    And if i am not wrong and get you correctly than i think you need to read about OCR for JAVA.
    Regards,
    Joshi Shirin.

  • Why there is no datatype which only stores date (without time part)

    Hi All,
    Is there any specific reason for not having a data type which only stores date (without time part) in ORACLE - I am asking this because DATE (without time) is a very frequently used data type in any application.
    Thanks.

    884476 wrote:
    Then why ORACLE is allowing to have scale and precision in a NUMBER data type. If I want to store an integer there is no harm in storin it just as NUMBER. But I habe option to give something like NUMBER(10). But in DATE, the time part is mandatory.a) because there's no need for seperate DATE and DATETIME datatatypes, and b) the time part is not 'mandatory'.
    SQL> create table mytable (x date);
    Table created.
    SQL> insert into mytable (x) values (to_date('01/01/1980','DD/MM/YYYY'));
    1 row created.
    SQL>The DATE datatype contains the Time as well, to make it flexible... a single datatype that can do both things without the need for any conversion between datatypes (either explicitly or implicitly).
    Yes, many application need to have fields on the screen that just show a date, such as a date of birth as you say, but that's simply a display issue, and any application interface will allow for a date format to be specified for displaying the data from the database, so in terms of such "Date only" dates, you would simply use a format mask that ignores the time portion.
    There's absolutely no issue with the fact that it's just a single datatype... it causes no problems... it's perfectly flexible at being used for just dates or for dates and times... so why such a concern?

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • Readind Date and Time from a folder.Urgent help please

    Folks,
    I need some help regd reading of date and time from a folder.
    I have a folder which has 5 files.
    I need to read these files along with the date and time
    The date and time has to be in the format:
    mm/dd/yy and the time in 11:55
    I am attaching my code below,
    The f.lastModified() doesnt display the data in the current format
    Can some one please please help me to get the data in the format defined above
    private void readFoldert(){
       String folder = "/images/";
       File f1 = new File(folder);
       ArrayList al = new ArrayList();
        if(f1.isDirectory()){
         String s[] = f1.list();
          for(int i=0; i<s.length;i++){
             al.add(s[i] + f1.lastModified);                    
    } // End of if.
           

    Here's how to format a time. I hope you can figure out how to format a date:import java.text.*;
    import java.util.*;
    public class Test {
        public static void main (String[] parameters) {
            Calendar calendar = new GregorianCalendar ();
            calendar.setTimeInMillis (new java.io.File ("c:\\windows").lastModified ());
            System.out.println (DateFormat.getTimeInstance (DateFormat.MEDIUM).format (calendar.getTime ()));
    }Kind regards,
      Levi

  • How-to extract data in chunks from one R3 to another R3 system

    Does anybody know how to extract data in chunks from one system to another? Imagine you would like to extract 1M records in chunks of 10K records, how would you do it between 2 different R3 systems? A cursor (even with hold) doesn't work
    Any suggestion appreciated
    Thanks
    Ioan

    Hi Ioan,
    I'd do it with fm : TABLE_ENTRIES_GET_VIA_RFC (with where clause-tab)
    or fm GET_TABLE_RFC (get all items)
    regards Andreas

  • How to Extract data and reports from the SAP BW warehouse

    Hi to All Guru's
    I am new to SAP BW. Can any one help me to know, How to Extract data and reports from SAP BW. Do we use any tools.  After Extracting the data from SAP BW how can we move all the data to Cognos.  It would be kind enough to provide me with any documentation or links.  Step by step procedure would be very much helpfull to me.
    Thanks
    Venu

    Hi Voodi
    Thanks for the quick response. I think Open hub is to extract the data from SAP BW, but what about sending this data into Cognos.  Can you please let me know in detail regarding answer. If possible send me any documentation or links regarding this.  Thanks for your concern.
    Venu

  • Is there a way to remove the date and time from pictures?

    Is there a way to remove the date and time from phoos in iPhoto?

    Are you referring to the Date and Time some cameras put right on the image?  If so there is nothing really good in iPhoto to do this. You could try the Retouch tool and see how that looks but I think you will need something more precise and powerful, like the clone tool in Aperture.
    Also something like PhotoShop or GIMP - The GNU Image Manipulation Program (free) should do what you want also.
    If your asking about some other date post back.
    regards

  • Can not extract data into BW from SQL SERVER

    Dear All,
      I meet a problem to extract data from database(MS SQL Server 2000(sp3)) into BW now and can not extract data into BW ODS, even PSA, In the monitor, display yellow light(0 from 0 record), detail message just display message "data request arranged" "confirmed with: confirmation" in requests(message) step; "missing message: request received" in extract (message)  step; "no data" in processing(data packet) step and so on. but in fact, there are two records in my database test table and DB connection is OK. Even I can extract data from another test oracle database into BW ODS successfully.
       Our BW system has two BW applicaton server and use oracle database. the one application server locates on IBM AIX host. the another one locates on one NT server. the application server on NT server is used for data extration from MS SQL SERVER  database into BW oracle database. and MS SQL SERVER and NT platform application server locate on same one host. DBSL was installed on the NT application server already. and DB connector also was created successfully for MS SQL SERVER and datasource also was generated. DBSL type is Kernel640-WIN-IA32bit-unicode. my BW system is ECC5.0/UNICODE/ORACLE. all table/view/field name of MS SQL server is upcase and have not any specific character. for example: ZDEMO etc.
    wait your help.
    Thanks in advance.
    Billy

    Hi  Ravi,
    Could you help me to get knowledge about the followings:
    approximately how many records    extracting and transfering  from SAP R/3 to BIW  in an organisation. for that how much time  will take .
    How to extract data from  two are three source system  to BIW. Kindly help me with step by step explanation .If any screen shots with documents pls fwd to my ID. "[email protected]"
    Your help highly appreciated.
    Thanks.
    Hema

  • Get the date and time from iframe.

    Hi,
    Am using jdeveloper 11.1.1.6.0., I have used the following iframe source which gets the date and time.
    <af:form>
    <iframe src="http://free.timeanddate.com/clock/i3xb4nm0/n1722/tt0/tw0/ts1" frameborder="0" width="244" height="19">
          </iframe>
    </af:form>
    I need to get the date and time separately to perform some validation. How can i  get it.
    regards,
    Prasad K T,
    9840021070

    Prasad,
    I don't understand your use case. The url you use is a json web service which returns it's result as either xml or json payload. Why do you pretty print this as a web page and try to get to the result this way?
    Why don't you get the result directly using the json result or (AFAIK) the java script api which the service also provides.  Check the documentation of the service.
    From your description I understand that the user enters a time. You need to know if the time is before or after 2:30pm and have to set a 'shift' to A or B.
    Where do I need a timeservice in this validation?
    From what I see your approach won't work. As I still don't understand the use case I don't know how to help.
    Timo

  • How to prevent calendar from deleting dates and times from event names?

    Calendar automatically discards date and time information from titles of new events. For example, creating a new event with the text "Staff Meeting 9 a.m. board room" leaves only "Staff Meeting". Calendar discards the "9 a.m. board room" information without asking. This feature is not helpful to me. How do I disable it?

    >
    Apple Support Communities > Mac OS & System Software > OS X Mountain Lion > Discussions

  • Date and time from array of string

    I have managed to read information from an excel spreadsheet I am using and display different parts of it in indicators on my front panel. But the data being displayed for the cells that contain the date and time are showing up incorrectly.
    The date of 15/08/2014 shows in the indicator box as 41866 and the time of 13:55:00 shows as 0.579861111111111
    Is this something I need to change in the excel file or do I need to alter the data in the array before displaying it in the indicator.
    Sorry if this has been explained in the past. I just cant seem to see a previous solution.
    Thanks in advance

    Hi n,
    please search for your problem in the forum. This has been discussed a lot of times before! (keywords: Excel LabVIEW timestamps)
    Excel stores timestamps as number of days (your 41866) and part of days (0.5798d = 13H55M). You need to convert those numbers using some (more or less) simple math to LabVIEW timestamps!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Want to extract data in xml from pdf.....

    i am newbie to LIVECYCLE ES.
    i made a pdf form design.
    Now i need a process which which can extract data in xml format
    from pdf form...
    Please give me example which i can understood or...step by step information.

    Hi Arun,
    Where there you are using WHERE condition  in select statement while fetching the records?
    if yes means check for the fields are primary key, available in WHERE condition, or else create secondary index for those
    non Primary key Fields in WHERE condition.
    This may help you.
    Thanks and Regards,
    Prakash.K

  • Is it possible to extract data with jdbc from msword???

    I need to extract data from word.
    Is it possible and can I do that (if you've got code it would be nice)
    Thanx

    I am not sure whether it is possible but if ever, it must be with a Microsoft COM object. i.e. you have to write a COM-Wrapper java class to access the content of a word file.
    The best way i can consider is to use the OLD Visual J++, which was deprecated after .NET and C# were introduced.
    It may still function, if your project is nothing commercial.

  • Getting the date and time from NIST server

    I need to be able to get the date and time in an app and cannot trust the device's clock since the user could change it. Has anyone got an example of how to access an Internet time server such as the NIST servers from AIR for iOS?

    What is the best way to get the date and time?
    ThanksI am not sure that this is the best way. But one of the ways.
    <code>
    java.util.Date d = new java.util.Date();
    System.out.println("date is "+d.toString());
    </code>

Maybe you are looking for

  • IPad for college advice

    I have to gift an iPad to a college student. My question is: get the new iPad or wait for a new model? I understand that every year will be the same question but I looked at A6 processor benchmarks (iPhone 5) and it's stunning. I believe they will do

  • Problem in downloading an html page that contains images

    Hi, This is surekha I am facing a problem in downloading an html page that contains images The file is downloading , but when I access the the downloaded file it displays X marks in the place where images r present.... How can i download a html file

  • MacBook shuts off abruptly after a few minutes of inactivity

    My MacBook (White, first generation) shuts off abruptly even if I leave it idle for 5 minutes whether on battery or on AC. I already tried battery calibration. I changed power saver settings to "never sleep" in both battery and ac modes. Moreover, wh

  • Problem with executable jar file

    Hi, I wrote a simple little xml based app in eclipse, it had xalan and xerces in build path. I created an executuable jar that ran fine on my machine; I was able to move it to different directories and launch it successfully, but when I put the jar f

  • Downloading updates on apps

    Why does my app updates keep reappearing in the app store reading availalable after downloading them the first time?