Need to convert string data to numbers.

I have string data that I need to convert to numbers so that I can graph it or perform calculations on it. The data (file attached) is in three columns (tab separated) and is in the format time/double/time (saved as a string with Write haracters to File.) When I try Read From Spreadsheet I get 0.0000 for column 1 and 2.0000 for column 3.
Attachments:
testOK.txt ‏1 KB

Hi,
I've done this through scan from file, using %s%f%s%s so I get the relative time, numeric, time, PM
See the attached .vi.
Hope it helps
S.
// it takes almost no time to rate an answer
Attachments:
disect_data.vi ‏46 KB

Similar Messages

  • 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.

  • Need to convert long data type to varchar2

    I need to convert a long datatype in an existing table to a
    varchar2, in either another table or view. I have a 3rd party
    application which needs to query the data in the long data type,
    but it can "handle" the long.
    What is the best way to do this? I tried to make a trigger, but
    I must be missing something. Here is the trigger.
    CREATE OR REPLACE TRIGGER "PROD".SV_GET_RTG_COMNT
    BEFORE INSERT OR UPDATE ON PROD.RELS_RTG_SEQ_COMNT
    FOR EACH ROW
    WHEN (OLD.rels_rtg_no = NEW.rels_rtg_no)
    DECLARE
    -- DECLARE VARIABLES
    RTG_COMNT_VAR VARCHAR2(32);
    RTG_COMNT_LONG LONG;
    BEGIN
    Select COMNT_TXT into RTG_COMNT_LONG
    from rels_rtg_seq_comnt;
    RTG_COMNT_VAR := 'TEXT' || substr(RTG_COMNT_LONG,1,32);
    -- If INSERTING
    Insert into SV_RTG_SEQ_COMNT (print_cd, comnt_no,
    seq_no, rtg_no, comnt_txt) values
    (:new.print_cd, :new.comnt_no, :new.seq_no, :new.rels_rtg_no,
    rtg_comnt_var);
    END;
    I tried to use the substr command on the comnt_txt in view but
    received an invalid datatype error.
    Any help would be greatly appreciated.
    Doug

    create another table with clob datatype
    1)create table clob_tab(pkval number,clob_col clob);
    2) insert into clob_tab (select pkval,to_lob(long_col) from
    long_tab);
    3) use dbms_lob package to do string manipulation using
    substr,instr functions on clob column.

  • How to convert String date to java sql date

    I have an html form for entering the Date on retreving that value in a java servlet i get it as a string i want to convert that date to SQL date format so that i could use setDate() method of the java.sql.Date class to update the date value in the database.
    i used the following way but i need the code without using the deprecated ones.
    String delDate = (String)p_Request.getParameter("deleteDate");
    [b]java.util.Date utilDate = new java.util.Date(delDate);
    java.sql.Date deleteDate = new java.sql.Date(utilDate.getTime());
    custCode = (String)p_Request.getValue("custCode");
    thanx in advance.

    Check out the later posts in http://forum.java.sun.com/thread.jspa?threadID=647681&messageID=3814745#3814745

  • LV 8.5.X: Converting String Data/Time to Timestamp

    Hello again,
    is there really no convenient way to convert a String Data/Time to an
    Timestamp?
    Thanks and greetings
    Udo

    You can use the Scan from String function:
    Look at the bottom for an example. If you can't get the format string right, you can configure a timestamp control/indicator to what you need and then use the properties (right click) then select Advanced at the bottom to get the string you need.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • How to convert string date to long (or Unix date)?

    I'm having difficulty in converting a user supplied date in the format mm/dd/yyyy to a long format such as 1035462807000. Since it's being entered by the user I can't just use the current system date. Any suggestions? Thanks!
    Dave

    Hi man, tsith Gave a good beggining, why dont you try the next code
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.text.ParseException;
    import java.util.Date;
    public class DateToUnix{
        public static void main(String args[]){
            getDateAsLong();
        public static void getDateAsLong(){
            String sStartDate = "12/01/2002";
            Date theDate;
            DateFormat sdf= new SimpleDateFormat("MM/DD/yyyy" );
            try {
                theDate = sdf.parse( sStartDate );
            }catch(ParseException e ){
                theDate = new Date();
            System.out.println( "Converted Start Date:" + theDate.getTime());
    }No mather how you get a Date object, the value you are looking for is a long, and you can get it from such object with the getTime() method.
    Take a look at the Java API @ [http://java.sun.com/j2se/1.4.1/docs/api/java/util/Date.html#getTime()]

  • Convert string date

    Dear experts.
    How can I transfer a string date into string date of previous year, Ex: 24.10.2008  into => 24.10.2007
    Thanks for your reply
    Huynh Kim Binh

    Hi
    I got a solution, fomular is: DSTR(DADD(STORE@Date,-1,'Y'),"DD.MM.YYYY")
    Thanks
    HKBinh
    Edited by: Huynh Binh on Oct 25, 2008 5:17 AM

  • Converting string data from a web service respons into XML structure of XI

    Hi,
    We receive a string structure from a web service.
    The string structure has an xml type format, that is all the tags and its content are in one line .
    The WSDL file of the webservice defines its response structure as a string type.
    How do i convert this string into proper XML structure (predefined by me in Integration repository).
    OR how do i make XI understand this string as an XML structure for further processing.
    Later i have to map this XML message type into IDoc.
    Himani

    Hi Himani,
    Please find the code for ur requirement -
    String need to parse -<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>
    Below mentioned code will convert it to -<MT_DATA><FROMDATE>20080202</FROMDATE><TODATE>20080101</TODATE></MT_DATA>
    Create a Message type and map it like this using java mapping ( no need to use Graphical mapping).
    Use MT_DATA as source and map it to your target structure .
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.StringReader;
    import java.util.HashMap;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    public class XMLParser {
         private Map param = null;
         public static void main(String[] args) {
              try {
                   XMLParser wdb = new XMLParser();
                   wdb.parse();
              } catch (Exception e) {
                   e.printStackTrace();
         public void setParameter(Map param) {
              this.param = param;
              if (param == null) {
                   this.param = new HashMap();
         public void parse() {
              String document = "<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>";
              try {
                   Document sdoc;
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   // Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   // parse using builder to get DOM representation of the XML file
                   sdoc = db.parse(new InputSource(new StringReader(document)));
                   Element docEle = sdoc.getDocumentElement();
                   NodeList nl = docEle.getElementsByTagName("from_date");
                   Element lstElmnt = (Element) nl.item(0);
                   NodeList nl1 = docEle.getElementsByTagName("to_date");
                   Element fstElmnt = (Element) nl1.item(0);
                   System.out.println(fstElmnt.getFirstChild().getNodeValue());
                   System.out.println(lstElmnt.getFirstChild().getNodeValue());
                   Document tdoc = db.newDocument();
                   Element structure = createElement("MT_DATA", null, tdoc);
                   tdoc.appendChild(structure);
                   Element statement = createElement("FROMDATE", fstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement);
                   Element statement2 = createElement("TODATE", lstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement2);
                   System.out.println("Struct is :::"+tdoc.getDocumentElement().toString());               
              } catch (DOMException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              }  catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (FactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (ParserConfigurationException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SAXException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (TransformerFactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         static Element createElement(String elementName, String content,
                   Document document) {
              Element returnElement;
              returnElement = document.createElement(elementName);
              if (content != null) {
                   Text T = document.createTextNode(content);
                   returnElement.appendChild(T);
              return returnElement;
         static Element createElement(String elementName, String content,
                   String attributeName, String attributeValue, Document document) {
              Element returnElement = createElement(elementName, content, document);
              returnElement.setAttribute(attributeName, attributeValue);
              return returnElement;
    Regards,
    Kishore

  • Converting string containing multiple numbers to numbers eg.(1,2,3)

    SQL only for report (in Hummingbird... sigh...)
    example code:
    select * from table
    where numberfield in
    (select varchar2field from othertable where this = that)
    (select varchar2field from othertable where this = that) output: 125,458,784,56,895,121545,8
    i need oracle to run it like:
    select * from table
    where numberfield in
    (125,458,784,56,895,121545,8)
    and
    example code:
    select * from table
    where x in
    (select varchar2field from othertable where this = that)
    (select varchar2field from othertable where this = that) output: Select x from y
    i need oracle to run it like:
    select * from table
    where x in
    (Select x from y)

    SQL> WITH NUMBERS AS
      2       (SELECT '123,456,77889' AS NUMBERFIELD
      3          FROM DUAL), DATA AS
      4                     (SELECT 123 AS NUM FROM DUAL UNION ALL
      5                      SELECT 234   FROM DUAL UNION ALL
      6                      SELECT 125   FROM DUAL UNION ALL
      7                      SELECT 145   FROM DUAL UNION ALL
      8                      SELECT 77889 FROM DUAL)
      9  SELECT NUM
    10    FROM DATA, NUMBERS
    11   WHERE INSTR(',' || NUMBERS.NUMBERFIELD || ',', DATA.NUM) > 0
    12  /
           NUM
           123
         77889hth, Urs

  • Converting String Date to Date Format

    Hope you can help, I am tearing my hair out. I have a 2D table that stores information. I have a field that records a date in the format 03-May-11 (this is a string). However, it is also stored as a number 40666 in a sortkey field. The string field is CLIENT2D.INFO1 and i have tried to use Date({CLIENT2D.INFO1}) to show as a date, which it does, until i want to use it as a parameter i.e. bring records between two dates. It errors and comes up with bad date format.
    Is the 40666 number Unix Time? If so is there anyway to convert this to a Date 03/05/11?

    Try
    CDate({CLIENT2D.INFO1})
    Ian

  • How to convert a String data to Double or Float???? Thank you

    I need to convert String data to Double or Float , please help me about it. Thank you very muh!
    String a=Integer.parseInt("1234"); convert to integer.

    I found it but do not know if it is ok
    float a= Float.valueof(String to
    convert).floatValue();
    may be it can be!!!
    Thank you !!!!How did parseInt lead you do valueOf?
    Look for something more consistent. A pattern.As I said earlier, it depends if he wants an object or a primitive.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Facing problem in converting string to date using getOANLSServices()

    I am trying to set a value for date field in my vo and trying to insert into the table.
    In controller I am getting the String which has a date:
    ex: String date="01-NOV-2007";
    while setting into the row I need to convert into Date but it is returning null.
    The below code I used
    to convert into date :
    Date dt = new Date(getOADBTransaction().getOANLSServices().stringToDate(date));
    But this dt is returning a null value is there any solution please advise me.
    Regards!
    Smarajeet

    Smarajeet ,
    See this thread, in one of my replies i have mentioned how to convert string to java.sql.date.You can use the same for oracle.jbo.domain.Date.
    urgent!How to set the default selected date for an OAMessageDateFieldBean
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to convert a STRING data to a XSTRING data?

    Hi Expert,
    In SAP, we need use a XSTING to convert a PDF document, but 3rd system send a STRING data to SAP. So I need to convert STRING to XSTRING, How to do it? Thanks in advance!
    Regards

    Hi,
    <li>Use the fm SCMS_STRING_TO_XSTRING.
      call function 'SCMS_STRING_TO_XSTRING'
        exporting
          text           = text  "type STRING
        importing
          buffer         = content. "type XSTRING
    Thanks
    Venkat.O

  • Converting a Date in UTC to the current timezone

    I have a library which returns a Date in UTC.
    I need to convert this Date to the current timezone, and then format it using SimpleDateFormat.
    I've been trying for a while now, and I can't figure it out? Can anyone help?
    Thanks,
    Adam

    SimpleDateFormat takes a timezone.
    Date d = getDateInUTC();
    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
    TimeZone tz = TimeZone.getTimeZone("PST")
    sdf.setTimeZone(tz);
    String sDate = sdf.format(d);

  • How to Convert Binary Data in Binary File

    hi,
    my telecom client puts a binary file which is asn.1 encoded with BER.
    how to handle binary data in java.
    how to convert binary to hexa to ascii format
    how to convert binary to octet to ascii format
    please help me in this.
    regards,
    s.mohamed asif

    You don't need to convert the data.
    Only you can do is print it in that formats, like it:
    public static String byteArrayToHex(byte[] b) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < b.length; i++)
             sb.append(Integer.toHexString(b&255) + " ");
    return sb.toString();
    take a look at this
    http://java.sun.com/docs/books/tutorial/essential/io/

Maybe you are looking for

  • How to create a PDF Book for mobile devise

    Hi looking at creating a PDF book for mobile device, the book will be a reflection of some of the content of our website http://www.khaolakexplorer.com/ , is there a way to create it automatically??

  • Country is not listed

    I would like to be able to call someone in Morocco from my landline with a Skype number.  Morocco does not appear on the list.

  • After update (10.7-10.8) Why is album artwork missing, though the artwork is present in Mp3 file?

    I recently updated from Lion 10.7  to Marverick 10.8. My library seems to be intact, all files and previous library organization is as previous. Yet, When I am viewing the library, much of the artwork is missing. (Nearly all apart from recent purchas

  • Trouble installing cc lightroom over trial version

    I downloaded lightroom5 trial version on my MacPro desktop.  works great.  then I purchased a complete Creative Cloud license.II I installed everything on my laptop no problems and did not have any trial versions on it. I installed everything on my d

  • Multicasting + connecting to other computers

    Hi. I found code for a chat client in a book and it uses multicast to connect to other computers. My question is can you use this to connect to other computers?? (I can connect to any computer on my home's network, but I can't connect to people at th