How to Convert Varchar2 to Date format(Timestamp)

I have a date saved in varchar2 column.
how can I convert the values into date(including Time stamp), so I can use the date to compare data.
Ex: I have the value '20-03-2007 05:31:29', but this value is saved as varchar2.
how can I take from this value the date '20-03-2007 05:31:29' as date format because later i need that date completely to add days, hours and minutes?

SQL> create table dd (a varchar2(15));
Table created.
SQL>
SQL>
SQL> insert into dd values (sysdate);
1 row created.
SQL> insert into dd values (sysdate);
1 row created.
SQL> insert into dd values (sysdate);
1 row created.
SQL> insert into dd values (sysdate);
1 row created.
SQL> insert into dd values (sysdate);
1 row created.
SQL> insert into dd values (sysdate);
1 row created.
SQL>
SQL> commit;
Commit complete.
SQL>
SQL> select * from dd;
A
01-OCT-12
01-OCT-12
01-OCT-12
01-OCT-12
01-OCT-12
01-OCT-12
6 rows selected.
SQL>
SQL>
SQL> select to_date(a,'dd-mon-yyyy') from dd;
TO_DATE(A
01-OCT-12
01-OCT-12
01-OCT-12
01-OCT-12
01-OCT-12
01-OCT-12
6 rows selected.
SQL> select to_timestamp(to_date(a,'dd-mon-yyyy'),'dd mon yy hh24.mi.ss' ) from dd;
TO_TIMESTAMP(TO_DATE(A,'DD-MON-YYYY'),'DDMONYYHH24.MI.SS')
01-OCT-12 12.00.00 AM
01-OCT-12 12.00.00 AM
01-OCT-12 12.00.00 AM
01-OCT-12 12.00.00 AM
01-OCT-12 12.00.00 AM
01-OCT-12 12.00.00 AM
6 rows selected.
SQL>
that's it......

Similar Messages

  • How to convert milliseconds to date format in sql query

    Hi All,
    The following code is in java.     
    String yourmilliseconds = "1316673707162";**
    Date resultdate = new Date(Long.parseLong(yourmilliseconds));
    could you plese tell me how to convert milliseconds into date format in query and comparing with another date like(sysdate-3)

    Hello,
    http://stackoverflow.com/questions/3820179/convert-epoch-to-date-in-sqlplus-oracle
    Regards

  • Converting varchar2 to date format

    I've converted date formats many times, but for some reason I'm getting an invalid number error when trying to convert a varchar2 column. I've tried the to_char and to_date function and I get the same result. The column is a date and it is formatted as DD-MON-YYYY, but I want to change it to MM/DD/YYYY. My query is below:
    select to_date('fccpdate','MM/DD/YYYY')
    from cc_class_scmast_v
    When I try to_date I get this:
    Error starting at line 1 in command:
    select TO_DATE('fccpdate', 'DD-MON-YYYY') from cc_class_scmast_v where fccpdate IS NOT NULL
    Error report:
    SQL Error: ORA-01858: a non-numeric character was found where a numeric was expected
    01858. 00000 - "a non-numeric character was found where a numeric was expected"
    *Cause:    The input data to be converted using a date format model was
    incorrect. The input data did not contain a number where a number was
    required by the format model.
    *Action:   Fix the input data or the date format model to make sure the
    elements match in number and type. Then retry the operation.
    When I try to_char I get this:
    Error starting at line 1 in command:
    select TO_char('fccpdate', 'DD-MON-YYYY') from cc_class_scmast_v where fccpdate IS NOT NULL
    Error report:
    SQL Error: ORA-01722: invalid number
    01722. 00000 - "invalid number"
    *Cause:   
    *Action:
    I've tried removing the single quotes from my column and that doesn't make a difference. Any help is appreciated.

    Hi,
    housetiger77 wrote:
    I've converted date formats many times, but for some reason I'm getting an invalid number error when trying to convert a varchar2 column. I've tried the to_char and to_date function and I get the same result. The column is a date and it is formatted as DD-MON-YYYY,If the column is a DATE, then it has the same format that all DATEs have, which is nothing like 'DD-MON-YYYY'. Formats like that only apply to strings.
    Conversely, if it is formatted as 'DD-MON-YYY', then it is a string, not a DATE.
    but I want to change it to MM/DD/YYYY. My query is below:
    select to_date('fccpdate','MM/DD/YYYY')
    from cc_class_scmast_vTO_DATE (x, 'MM/DD/YYYY') tries to convert the string x into a DATE. Let's say it starts by taking the first 2 characters of x, to get the month. The first 2 charcters of 'fccpdate' are 'fc', which is not a valid number (at least not in base 10), let alone a number between 1 and 12, so TO_DATE raises an error.
    When I try to_date I get this:
    Error starting at line 1 in command:
    select TO_DATE('fccpdate', 'DD-MON-YYYY') from cc_class_scmast_v where fccpdate IS NOT NULL
    Error report:
    SQL Error: ORA-01858: a non-numeric character was found where a numeric was expected
    01858. 00000 - "a non-numeric character was found where a numeric was expected"
    *Cause:    The input data to be converted using a date format model was
    incorrect. The input data did not contain a number where a number was
    required by the format model.
    *Action:   Fix the input data or the date format model to make sure the
    elements match in number and type. Then retry the operation.
    When I try to_char I get this:
    Error starting at line 1 in command:
    select TO_char('fccpdate', 'DD-MON-YYYY') from cc_class_scmast_v where fccpdate IS NOT NULL
    Error report:
    SQL Error: ORA-01722: invalid number
    01722. 00000 - "invalid number"
    *Cause:   
    *Action:
    I've tried removing the single quotes from my column and that doesn't make a difference. Any help is appreciated.That's a good first step. Literals are enclosed in single-quotes, identifiers (including column names) are not. 'fccpdate' is the literal 8-character string containing 'f', 'c;, another 'c', 'p', 'd', 'a', 't' and 'e'. fccpdate (without single-quotes) can be the name of a column.
    If fccpdate is a string, such as '18-JUL-2012', then you can convert it to a DATE using TO_DATE.
    TO_DATE (fccpdate, 'DD-MON-YYYY')If you want to display a DATE in a particular format, use
    TO_CHAR ( d
            , f
            )where d is a DATE, and f is the format string. In this case, d might be the TO_DATE expression above
    TO_CHAR ( TO_DATE (fccpdate, 'DD-MON-YYYY')
            , 'MM/DD/YYYY'
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • How to convert Milliseconds into Date format

    Hi all,
    I am getting the output of a variable in milliseconds format, how can I convert it into date format
    For ex: I am getting input variable as 1366664691000 and I need to convert it to April 22, 2013 5:04:51 PM EDT ( or of SOA format). is there any function for this in XSL or XPath?
    Thanks,

    It is working fine if i test it in provided site...
    But it is returning "-1366664691001", If i am running it in EM. This is the code in my xsl
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="../JavaProcess.wsdl"/>
    <rootElement name="process" namespace="http://xmlns.oracle.com/SampleApplication/JavaEmbeddingActivity/JavaProcess"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="../JavaProcess.wsdl"/>
    <rootElement name="processResponse" namespace="http://xmlns.oracle.com/SampleApplication/JavaEmbeddingActivity/JavaProcess"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE MAY 07 10:21:02 EDT 2013]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bpmn="http://schemas.oracle.com/bpm/xpath"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:client="client"
    exclude-result-prefixes="xsi xsl bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref bpmn ora socket ldap">
    <xsl:template match="/">
    <xsl:variable name="lastMTime" select="1366664691000"/>
    <xsl:copy-of select="$lastMTime"/>
    <client:processResponse>
    <client:result>
    <xsl:value-of select='xsd:dateTime("1970-01-01T00:00:00") + $lastMTime * xsd:dayTimeDuration("PT0.001S")'/>
    </client:result>
    </client:processResponse>
    </xsl:template>
    </xsl:stylesheet>

  • How to convert COLUMN_WID to date format mm/dd/yyy

    Hi Experts,
    How do I convert the COLUMN_WID (ex. 20121120) to date format mm/dd/yyy (ex. 11/20/2012) using the RPD in BMM Layer?
    Hope that I convey my questions clearly.
    Thanks,

    Hi,
    By Analysis:Go to edit analysis -->date(YYYYMMDD) column properties--->select Data format tab -->
    enable Override Default Data Format check box and select date format as "Custom" then
    Custom Date Formate mm/dd/yyy then test it
    Also you can do it via evaluate function (analysis/RPD)
    Thanks
    Deva

  • How to convert from ifs date format to sql based dates

    I want to write a sql query using dates, to search an ifs
    database. Ifs stores dates as numbers created using the
    java.util.Date class. These dates are accurate to seconds.
    PLSQL uses a different format.
    What I need is a PLSQL function that converts PLSQL date format
    to and from the java.util.date format.
    This is an example of what I would like to do.
    String classname = "DOCUMENT";
    String whereclause = "CREATEDATE > theNeededFuction(to_date('01-
    Jan-2001', 'DD-Mon-YYYY'),'j')";
    Selector mySelector = new Selector(login.getSession());
    mySelector.setSearchClassname(classname);
    mySelector.setSearchSelection(whereclause);
    I do realize that I could simply convert the date in java, but
    in the long run, I want to use the oracle tools that support
    busness day calulations.
    -Mitch

    Hi Mitch - our ViewSpecification functionality automatically
    includes an Oracle Date column, which is derived from the java
    date values we store. These views are the supported way of
    performing read-only operations against an iFS instance.
    For yor reference, the Oracle date column is derived using the
    following SQL operation (e.g. for createdate):
    to_date('01-JAN-1970', 'DD-MON-YYYY') + (createdate/86400000)
    regards,
    dave

  • How to convert string to date format?

    Hi All,
    String is in following format: 2006-12-07 i.e yyyy-mm-dd
    I want it in 07.12.2006 date format.
    which function module should i used to convert it?
    Regards,
    Nilima

    an other way to do this :
    Code
    DATA :
    ld_text(20) TYPE c,
    ld_date TYPE datum.
    ld_text = '2006-12-07'.
    REPLACE ALL OCCURENCES OF '-' IN ld_text WITH ''.
    WRITE ld_text TO ld_date.
    WRITE ld_date.

  • Source:Essbase, how to convert char in date format

    Hello
    Version OBI EE:10.1.3.4.1.090414.1900
    Source:Essbase
    We have date in format VARCHAR (01.01.2008). I want to have date in format DATE.
    I transform our date on Business Level in DATE (yyyy-mm-dd)
    CAST ( SUBSTRING(Copeck."Time"."Gen5,Time" FROM 7 FOR 4) || '-' || SUBSTRING(Copeck."Time"."Gen5,Time" FROM 4 FOR 2) || '-' || SUBSTRING(Copeck."Time"."Gen5,Time" FROM 1 FOR 2) AS DATE )
    And in Answers I can see our DATE in format DATE,
    but when I want to use filter on this field i get mistake
    HY000. Код: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] meaning date/time 2008-01-01 nonqualifying given format
    Состояние: HY000. Код: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] Возникла общая ошибка. [nQSError: 46046] Значение дата/время 2008-01-01 не соответствует заданному формату. (HY000)
    Сформированный SQL: SELECT Time."Дата начала4" saw_0 FROM Copeck WHERE Time."Дата начала4" = date '2008-01-01' ORDER BY saw_0
    When i use
    CAST ( SUBSTRING(Copeck."Time"."Gen5,Time" FROM 1 FOR 2) || SUBSTRING(Copeck."Time"."Gen5,Time" FROM 4 FOR 2) || SUBSTRING(Copeck."Time"."Gen5,Time" FROM 7 FOR 4) AS DATE ) - ddmmyyyy
    I can't see our DATE in format DATE in Answers, because I immediately get mistake
    When I use usual database, i don't have this mistake, may be it depends on Source date?

    I understand the converions for formatting dates. Thank you for this posting, it helped a lot. Now I need to take this one step further and that is modifying a date that comes the XML Datasource in the format I do not want.
    Start Date is the name of the field. It is in XML and my RTF as 2009/10/03 and I want 10/03/2009 or 03-Oct-2009.
    Any help on this is most appreciated.
    Thanks
    G

  • Convert Char to Date format - Evaluate

    Hi,
    Could anyone provide us the Evaluate formula to convert Char to Date format
    2009-06-20 should be converted to 06/20/2009
    Regards,
    Vinay

    Hi,
    Refer the below threads...
    Re: How to convert string to date format?
    how to convert character string into date format????
    Regards,
    Chithra Saravanan

  • How to convert internal table data to PDF format

    HI,
         I have an internal table data having one field with 255 chars. length.I want to send that intenal table data as attachemnt with external mail. i am thinking of converting that data into PDF format and use the FM to send the mail. How to convert internal table data to PDF format.
    Kishore

    In which format is your data in the internal table currently. Is it returned by a smartform/script or its just data fetched from some database table into an internal table. Since its obvious that the data should appear in the PDF with some Layout, you should be using smartform to format the data properly. See the Link
    Smartform to PDF to EMAIL
    This shows convertion of smartform to pdf and send it through email
    Regards,
    Abhishek

  • Convert to a date format

    Hi,
    I have a table with a date field that comes as varchar2(20byte) with a content like this:
    20/Jan/2011
    and I need it to be converted toa real date format e.g. 20.01.2011.
    Please help,
    Thanks
    Walter

    Hi, Walter,
    user457173 wrote:
    Hi,
    I have a table with a date field that comes as varchar2(20byte) with a content like this:
    20/Jan/2011
    and I need it to be converted toa real date format e.g. 20.01.2011.'20/Jan/2011' is actually just as "real" as '20.01.2011'. Neither is a real DATE; both are strings.
    Please help,
    Thanks
    WalterUse TO_DATE to convert a string into a DATE:
    TO_DATE ( column_x
            , 'DD/Mon/YYYY'
            )Use TO_CHAR to display a DATE in a given format:
    TO_CHAR ( d
            , 'DD.MM.YYYY'
            )d can be any DATE, including the DATE returned by the TO_DATE function, above.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    Edited by: Frank Kulash on Oct 25, 2011 7:57 AM

  • How to convert sysdate to the format dd-mon-yyyy

    how to convert sysdate to the format dd-mon-yyyy

    <how to convert sysdate to the format dd-mon-yyyy>
    This question is better answered by thinking about about how Oracle dates work. SYSDATE is a pseudocolumn (function without any arguments) that returns a date value: it already is a date. Oracle date values are stored not as we see them, say 'DD-MON-YY', but as a series of bytes with the different date components from the millennium down to the second. We NEVER see dates as they are stored but use the formats for automatic conversion.
    To display a date the way you want use TO_CHAR() with an edit mask or as others suggested change your NLS_DATE_FORMAT (thought I advise against this as most systems use DD-MON-YY and porting queries from other systems or even OTN can easily break). To change a converted string back to a date use TO_DATE() with an edit mask.

  • How to convert exponent to number format

    Hi,
    how to convert exponent to number format.My column is in number and the data is in exponent format .for example  data is 2.44705130197009E18 .when i do field name haveing this data like
    select * from table name where filed name =2.44705130197009E18 ,field name  is of number (20) data type .but i am not getting any data fectched .
    your advice is at most appriciated .
    Regards,
    Suja

    Example of what I was saying...
    SQL> create table myexp (name number);
    Table created.
    SQL> insert into myexp values (2447051301970090001);
    1 row created.
    SQL> select name from myexp;
          NAME
    2.4471E+18
    SQL> col name format 9999999999999999999999999999999999999
    SQL> select name from myexp;
                                      NAME
                       2447051301970090001
    SQL>
    The number you are seeing as an exponent is not just the number that is stored with lots of 0's on it, there's other information you are missing, so you need to change your format to see the true value.

  • How can we give the Data Format (File Type ) in Runtime

    Hi all,
    How can we give the Data Format (File Type ) in Runtime for the following method,
    cl_gui_frontend_services=>gui_download.
    Thanks in advance
    Sri

    There is a filetype parameter which you can set
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
    *    BIN_FILESIZE              =
        filename                  =
    *    FILETYPE                  = 'ASC'
    *    APPEND                    = SPACE
    *    WRITE_FIELD_SEPARATOR     = SPACE
    *    HEADER                    = '00'
    *    TRUNC_TRAILING_BLANKS     = SPACE
    *    WRITE_LF                  = 'X'
    *    COL_SELECT                = SPACE
    *    COL_SELECT_MASK           = SPACE
    *    DAT_MODE                  = SPACE
    *    CONFIRM_OVERWRITE         = SPACE
    *    NO_AUTH_CHECK             = SPACE
    *    CODEPAGE                  = SPACE
    *    IGNORE_CERR               = ABAP_TRUE
    *    REPLACEMENT               = '#'
    *    WRITE_BOM                 = SPACE
    *    TRUNC_TRAILING_BLANKS_EOL = 'X'
    *  IMPORTING
    *    FILELENGTH                =
      changing
        data_tab                  =
    *  EXCEPTIONS
    *    FILE_WRITE_ERROR          = 1
    *    NO_BATCH                  = 2
    *    GUI_REFUSE_FILETRANSFER   = 3
    *    INVALID_TYPE              = 4
    *    NO_AUTHORITY              = 5
    *    UNKNOWN_ERROR             = 6
    *    HEADER_NOT_ALLOWED        = 7
    *    SEPARATOR_NOT_ALLOWED     = 8
    *    FILESIZE_NOT_ALLOWED      = 9
    *    HEADER_TOO_LONG           = 10
    *    DP_ERROR_CREATE           = 11
    *    DP_ERROR_SEND             = 12
    *    DP_ERROR_WRITE            = 13
    *    UNKNOWN_DP_ERROR          = 14
    *    ACCESS_DENIED             = 15
    *    DP_OUT_OF_MEMORY          = 16
    *    DISK_FULL                 = 17
    *    DP_TIMEOUT                = 18
    *    FILE_NOT_FOUND            = 19
    *    DATAPROVIDER_EXCEPTION    = 20
    *    CONTROL_FLUSH_ERROR       = 21
    *    NOT_SUPPORTED_BY_GUI      = 22
    *    ERROR_NO_GUI              = 23
    *    others                    = 24

  • How can I change the date format in Reminders and in Notes?

    How can I change the date format in both Notes and Reminders? Preference on Imac and Settings in IOS do not allow me to change the format in those 2 apps.
    I Like to see 10oct rather than 10/10, as an example.

    pierre
    I do not have Mavericks or iOS - but the first thing I would do is reset the defaults - I'll use Mavericks as an example
    From If the wrong date or time is displayed in some apps on your Mac - Apple Support
    OS X Yosemite and Mavericks
        Open System Preferences.
        From the View menu, choose Language & Region.
        Click the Advanced button.
        Click the Dates tab.
        Click the Restore Defaults button.
        Click the Times tab.
        Click the Restore Defaults button.
        Click OK.
        Quit the app where you were seeing incorrect dates or times displayed.
        Open the app again, and verify that the dates and times are now displayed correctly.
    Then customize to taste - OS X Mavericks: Customize formats to display dates, times, and more
    OS X Mavericks: Customize formats to display dates, times, and more
    Change the language and formats used to display dates, times, numbers, and currencies in Finder windows, Mail, and other apps. For example, if the region for your Mac is set to United States, but the format language is set to French, then dates in Finder windows and email messages appear in French.
        Choose Apple menu > System Preferences, then click Language & Region.
        Choose a geographic region from the Region pop-up menu, to use the region’s date, time, number, and currency formats.
        To customize the formats or change the language used to display them, click Advanced, then set options.
        In the General pane, you can choose the language to use for showing dates, times, and numbers, and set formats for numbers, currency, and measurements.
        In the Dates and Times panes, you can type in the Short, Medium, Long, and Full fields, and rearrange or delete elements. You can also drag new elements, such as Quarter or Milliseconds, into the fields.
        When you’re done customizing formats, click OK.
        The region name in Language & Region preferences now includes “Custom” to indicate you customized formats.
    To undo all of your changes for a region, choose the region again from the Region pop-up menu. To undo your changes only to advanced options, click Advanced, click the pane where you want to undo your changes, then click Restore Defaults.
    To change how time is shown in the menu bar, select the “Time format” checkbox in Language & Region preferences, or select the option in Date & Time preferences.
    Here's the result AppleScript i use to grab the " 'Short Date' ' + ' 'Short Time' "  to paste into download filenames - works good until I try to post it here - the colon " : " is a no-no but is fine in the Finder
    Looks like iOS Settings are a bit less robust
    - Date/Time formats are displayed according to 'tradition' of your region > http://help.apple.com/ipad/8/#/iPad245ed123
    buenos tardes
    ÇÇÇ

Maybe you are looking for

  • How to Use Home+End Key on new short usb apple keyboard on XP

    How to Use Home+End Key on new short usb apple keyboard on XP now i use macbook and new short apple keyboard. it hasn't Home and End key. i try to use Fn + -> , Fn + <- it cann't do that. How can i set the Fn + <- be Home key and Fn + -> be End key l

  • How do I select which music my ipod quiz has questions on?

    The music quiz on my ipod nano 4gb only asks questions on albums with one song on them, which is about 5 in 24. It totally ignores all the other albums with more then one song on them. As you can imagine, it gets quite repetitive. I tried deleting al

  • New tab issue!!

    I am no expert with my mac so please forgive my non-technical language. When using safari, not on every occasion but sometimes when I open a new tab instead of giving me my option of top sites in the 'new' tab it opens this in the tab I am already us

  • Why is DVI displayed at startup?

    For a few seconds at startup or when starting from sleep mode, the computer displays "DVI" in a small retangular square.  After looking at this a few hundred times and waiting all those seconds, it does not look normal and has become annoying.  Any i

  • Error 1152 Subclass MovieClip has text field

    Hi, I have a movie clip "Obstacle" for a simple game. I have a class for it (Obstacle.as) that creates it, and moves it. In this Obstacle there is a text field - i use it for testing right now. The above works fine! NOW I want to make another Obstacl