How can I convert date in FOX (from DEC to date[DEC])

Hi everyone!
In my planning layout I have a field called "MYDATE" of the date-type "DEC: Calculation or amount field with comma and +/- sign" (-> BPS does not allow using DATS as date-type).
Since I import that date from a different system, I have to use a temporary workaround field "WADATE" (WorkaroundDate) of type DEC (alternatively integer or float) which contains the date in a format YYYYMMDD (e.g. 20070604).
How can I transfer the date from WADATE to MYDATE? I tried using FOX, but for some reason it does not work. When I use the following function, MYDATE remains empty:
DATA TMPDATE TYPE F.
DATA MYPROJECTS TYPE B906_PROJ.
FOREACH MYPROJECTS.
"MYDATE" is the field I want my date in
"WADATE" is my workaround field that contains the date
TMPDATE = {WADATE,000,0000000001,0000000001,001}.
BREAK-POINT.
{MYDATE,000,0000000001,0000000001,001} = TMPDATE.
ENDFOR.
Is it possible to solve my problem with FOX? Or do I have to work with an EXIT function?
Best regards, Daniel

Daniel,
The better approach is the one Marc said but if you have tomake a work around work, I think you might need to try and define your temporary date variable as String and another for the converted date as of type of the final date.  I would not define any date type as float unless you can have part days and it is very important to have part days, integer might work by I would try String first myself.
It has been a while but on a BW 3.5 project I had to do some manipulation to read the attribute value of material master data to get the launch date and use it to derive the start period (definited as type 0FISCPER) and proportion of month based on number of days remaining after launch date vs the # of days for the month.  I think I used string type function in FOX to derive some of the component...
Hope this helps,
mary

Similar Messages

  • How can I convert on HDF file from HWS file?

    how can I convert on HDF file from HWS file?

    Well by opening up the HWS file with HDFView, it contains the below structure.  In the axis0 properties (time axis) there is a field called increment that is the sampling rate I used (5 nanoseconds).  But I do NOT see any additional info in terms of triggering modes or delays, etc.
    wfm_group0
    axes
    axis0
    axis1
    data_vector
    data (here is our data, I verified it is correct)
    id
    traces
    trace0 (we don't care about this, I think)
    vectors
    vector0
    data (not sure what the difference is between this and axis1
    wfm_group0 (1576, 2)
        Group size = 4
        Number of attributes = 5
            major_version = 2
            minor_version = 0
            release_version = 6
            type = NI-Waveform
            writer = NI-HWS
    axis0 (7424, 2)
        Group size = 0
        Number of attributes = 5
            implicit? = 1
            increment = 5.0E-9
            numDigits = 57
            ref_time = 0
            start = 0.0

  • How can I convert a Database Handle from TestStand to LabVIEW?

    I want to use a Database Handle (already created in TestStand by an Open Database step) in a LabVIEW-VI (called from TestStand) to connect it with the "Connection Reference" input of the "Easy SQL.vi"? If I use a directly connection via the "TestStand - Get Property Value (Number).vi" I get back the error message 4101 in LabVIEW. How can I convert the Database Handle?
    Test Engineering
    digades GmbH
    www.digades.com

    The TestStand database step types use the CVI SQL Toolkit to talk to databases. The handle that you are referencing is an internal memory location and not a actual handle that you can directly use. Currently as implemented the handle that is stored in a numeric TestStand property for the connection and the SQL statement are the handle values returned from the CVI SQL Toolkit. So for the connection handle, you could call the CVI SQL Toolkit function
    DBGetConnectionAttribute (
    int Connection_Handle,
    tDBConnectionAttr Attribute,
    void *Value);
    and get the CVI CAObjHandle reference. With this you could then call the CVI ActiveX function
    CA_GetInterfaceFromObjHandle(
    CAObjHandle Object_Handle,
    const IID *Interface_Id,
    int Force_AddRef,
    void *Inte
    rface_Ptr,
    int *Did_AddRef);
    to get the actual ActiveX interface reference. This would have to be converted into a LabVIEW reference.
    You may want to consider just using LabVIEW to open a new parallel reference only using the toolkit.
    Scott Richardson
    National Instruments

  • How can I convert a numbers' file from iPad to an excel file on macbook pro?

    When I try to open a numbers file from my ipad mini in macbook pro, it appears unformated. How can I solve this situation? I don't have numbers on Macbook pro...is it necessary?

    I havne't had this problem myself, so I can only guess, but my first suggestion, if you haven't already, is to try sending it to yourself via email from the ipad & when it asks you for the format, choose excel.

  • How can I convert a number field in a to Date?

    I have two columns in a table, and i would like to concate this two fiels to read Januaray-2010
    CREATE TABLE "CATDB"."SC_DTL_MEASURE_DETAIL"
               "TIME_YEAR"                 NUMBER(*,0),
               "TIME_INCREMENT"            NUMBER(*,0),
       )Time_Incriment data need to be changed to month MON Januaray to December
    1
    2
    3
    etc
    12
    Time_year data is
    2010
    2010
    etc

    Well one way easiy way without changing your column datatypes (this would be the best way) is to first convert the numbers into text. Then concat this text. Then convert the text into a date value. Then print the date value as you want it to appear.
    example
    with testdata as (select 2010 TIME_YEAR, 1 TIME_INCREMENT from dual union all
                      select 2010 TIME_YEAR, 12 TIME_INCREMENT from dual)
    select time_year, time_increment,
           to_char(to_date('01-'||to_char(TIME_INCREMENT,'FM00')||'-'||to_char(TIME_YEAR,'FM0000'),'DD-MM-YYYY') ,'FMMonth-YYYY')
    from testdata;
    2010     1     January-2010
    2010     12     December-2010

  • How can I convert my web page from a fixed width layout to a fluid grid layout?

    I'm taking a web design class (I'm using Dreamweaver CS6, btw)  wherein the professor started us out building our websites in a fixed width layout but now I want to change my site into a fluid grid layout. My "site" so far is just one long page, and I've already designed it with fluid grid adjustments in mind (most things are centered  in the layout) so it shouldn't need excessive tweaking.
    Is there a way to duplicate the site folder that holds my first page, re-open a new document in fluid, then copy the code in and tweak the width parameters for the different layouts?
    Did I just answer my own question? Help - I am new at this!!
    Thanks all,
    KC

    Herbert2001 wrote:
    A bit off-topic, but Osgood: have you ever used SASS or LESS? When you are building your own grid systems it can save you a tremendous amount of time, and it's a lot of fun.
    Take the following simple example - it generates all the 23 css classes automatically for a 12 grid system. And simply changing one variable allows you to create and calculate any number of columns!
    //variables
    $desktop: 1025px;
    $large-columns: 12;
    @media only screen and (min-width: $desktop) {
         //regular grid span classes
        @for $i from 1 through $large-columns {
            .span-large-#{$i} {
                width: percentage($i/$large-columns);
         // push classes
        @for $i from 1 through (($large-columns)-1) {
            .push-large-#{$i} {
                margin-left: percentage($i/$large-columns);
    No, not explored it yet, and may never....I don't know. I don't really make much money out of web design. It's becoming more and more difficult to find the desire to learn new techniques when the opportunities aren't really there to put them into practice on as regular basis as I would like.  I've got  a very good handle on css, php, html, jQuery - I'm not sure I want to add another layer at the moment, given I'm never quite sure how long I will continue to 'bang my head against the wall' . I'm getting to the stage where I keep asking myself do I really need the problems associated with learning new stuff to the point of being comfortable with it if the financial rewards at the end don't equate to the efforts of learning it.
    I don't really enjoy web development if truth is known. I come from a Graphic Design background which I much prefer but somehow got side tracked and pushed in this direction and there's no way back now, lol. Whilst I concede Web Development is much more exciting its also 100 times more complex/difficult and the skills needed are considerably more.
    Your example looks interesting and I should think I could pick it up reasonably easily given I work with php which uses variables on a similar basis.

  • How can I convert "exists (select 1 from . ." into OWB

    Hello,
    I have sql statement that have to convert from PL/SQL to utilize OWB
    select a.1, a.2, b.1,b.2
    from a, b
    where a.1 = b.1
    and exists in (select 1 from c where a.3 = c.3)
    Thank you in advance.

    OWB does support EXISTS
    you can join tables a and b using simple joiner. from the output of this joiner , use a.3 to lookup on table c. select the business/primary key of table c from lookup operator and all other required fields from joiner into a filter. in the filter condition put condition
    c.businesskey is not null.
    Its like performing
    select a1,b1 from
    (SELECT
    c.businesskey bk,a.1 a1,b.1 b1
    FROM
    c lkp_tbl
    RIGHT OUTER JOIN a ON ( ( c.3 = a.3 ) )
    LEFT OUTER JOIN b ON ( ( b.1 = a.1 ))
    ) SUBQUERY
    WHERE
    SUBQUERY.bk is not null
    try it and let me know. I have tried not exists and it works in OWB fine

  • How can I convert a Gift Certificate from Canadian Store to US Store?

    My sister, who lives in Canada, bought us an iTunes gift certificate for Christmas. We tried to redeem it, but because she bought it through her account in the Canadian store, it is not accepted.
    Anyone know what we can do so we can use this money?
    I do have a Canadian mailing address, but do not have a credit card up there. Any help? We don't want to through the money down the drain!!!

    Anyone know what we can do so we can use this money?
    I do have a Canadian mailing address, but do not have
    a credit card up there. Any help? We don't want to
    through the money down the drain!!!
    Very little im afraid, the gift cards are country specific so unless you have a canadian account (which by the sounds of it, you don't) theres not much you can do.
    Since you do have a canadian address though, you may be able to create a Canadain account through gift card redemption, but Im not sure of the exact process to do that.

  • How can I convert my iTunes media from stereo to mono?

    Just a sound preference I would like to have. Lets keep it simple. (iTunes 10.6.1)

    http://www.radioshack.com/product/index.jsp?productId=2102690
    http://www.scansound.com/index.php/stereo-to-mono-adapter.html
    Or you could buy a mono/one ear headset. http://www.beso.com/2699431644/detail

  • How can i convert the firefox-history-timestamp in places.sqlite into a normal date format? The firefox-timestamp is not equivalent to the unix-timestamp, that's why I ask. I could not find a conversion function. Does anyone know something about this?

    As I opened the places.sqlite with an sqlite-editor I found out that firefox saves the last_visit_date via a timestamp which is 16 digits long. I realized that the first 10 digits are similar to the corresponding unix-timestamp but not equal. So.. how can i convert the firefox-timestamp into a normal date? Or into the corresponding unix-timestamp?

    Write a bash script or 'C' program to change the date format and then use the sql update function to receive the stdio output 'where date_field='embeded date value'.

  • How can I convert output data (string?) from GPIB-read to an 1D array?

    Hello all,
    I am reading a displayed waveform from my Tektronix Oscilloscope (TDS3032) via the GPIB Read VI. The format of the waveform data is: positive integer data-point representation with the most significant byte transferred first (2 bytes per data point).
    The output data of GPIB-Read looks like a string(?) where the integer numbers and a sign like the euro-currency sign are seperated by spaces e.g. #5200004C3 4 4 4 4 3C3C3........ (C represents the euro-currency sign).
    How can I convert this waveform data into a 1D/2D array of real double floatingpoint numbers (DBL) so I can handle the waveform data for data-analysis?
    It would be very nice if someone know the solution for this.
    t
    hanks

    Hi,
    First of all, I'm assuming you are using LabVIEW.
    The first you need to do is parse the string returned by the instrument. In this case you need to search for the known symbols in the string (like the euro sign) and chop the string to get the numeric strings. Here are some examples on parsing from www.ni.com:
    Keyword Search: parsing
    Once you parse the numeric strings you can use the "String/number conversion VIs" in the String pallette.
    Hope this helps.
    DiegoF.Message Edited by Molly K on 02-18-2005 11:01 PM

  • How can I convert a space from ABAP to CSV data?

    Hello guys,
    how can I convert a string like
    "This is a%test%"
    to
    "This is  a test "
    into CSV data?
    I try to with   REPLACE ALL OCCURRENCES OF '%' IN string_above WITH space,
    but I got the string without space, like
    "This is  atest"
    I read some posts that CSV will ignore space.
    But which kind of symbol in CSV represents space?
    Thanks for any suggestion!
    Regards,
    Liying

    USE THE CODE AS SHOWN BELOW...
    TYPES : BEGIN OF tp_data,
              line(4096),
            END   OF tp_data.
    *&      Form  gui_upload
          Upload the data from the input file to the internal table
    FORM gui_upload.
    *--Local data declaration
      DATA: l_filename_ip TYPE string,
            tl_data       TYPE STANDARD TABLE OF tp_data WITH HEADER LINE.
      l_filename_ip = p_input.
    *--Upload Data
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                filename                = l_filename_ip
                filetype                = 'ASC'
                has_field_separator     = ''
           TABLES
                data_tab                = tl_data
           EXCEPTIONS
                file_open_error         = 1
                file_read_error         = 2
                no_batch                = 3
                gui_refuse_filetransfer = 4
                invalid_type            = 5
                no_authority            = 6
                unknown_error           = 7
                bad_data_format         = 8
                header_not_allowed      = 9
                separator_not_allowed   = 10
                header_too_long         = 11
                unknown_dp_error        = 12
                access_denied           = 13
                dp_out_of_memory        = 14
                disk_full               = 15
                dp_timeout              = 16
                OTHERS                  = 17.
      IF sy-subrc <> 0.
        MESSAGE ID   sy-msgid TYPE 'S' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        IF sy-subrc = 1.
          MESSAGE e000 WITH text-e04.
        ENDIF.
      ELSE.
        LOOP AT tl_data FROM 2.
    *--Taking the contents of the input file leaving the header part
          PERFORM split_and_save USING tl_data-line.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " gui_upload
    *&      Form  split_and_save
          Splitting the contents from the input file and saving them into
          an internal table
         -->P_TL_DATA_LINE  text
    FORM split_and_save USING fp_data.
    *--Local data declaration
      DATA : tl_data TYPE STANDARD TABLE OF tp_data WITH HEADER LINE,
             l_type  TYPE c,
             c_space(1) TYPE c VALUE ' '.
    *--Split at the Comma
      SPLIT fp_data AT c_space INTO TABLE tl_data.
      CLEAR inputtab.
    *--Move it to the target fields
      DO.
        ASSIGN COMPONENT sy-index OF STRUCTURE inputtab TO <fs_field>.
        IF NOT sy-subrc IS INITIAL.
          EXIT.
        ENDIF.
    *--Extract source data
        CLEAR tl_data.
        READ TABLE tl_data INDEX sy-index.
    *--Populate the target
        <fs_field> = tl_data-line.
      ENDDO.
    *--Append this record
      APPEND inputtab.
    ENDFORM.                    " split_and_save
    In the above code u can use make inputtab like tp_data and get the result as requires in an internal table as space seperated fields.
    In place of space u can also use any other symbol.
    And after that u can replace all occurences of space with the comma by using the statement that u have written below.

  • How can i convert the data from mutiple-table to the other database(MSSQL)?

    Dears,
    How can i convert the data from mutiple-table to the other database such as MS-SQL?
    I have a third party system based on MS-SQL 2000.
    Now we want to make a integration between SAP R/3(Oracle) and SQL server.
    When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
    But i don't know which tools will help me reach the purpose.  BAPI, LSMW, IDoc... ???
    Would anybody tell me which way is better and how to do?
    Thanks a lot!
    Kevin Wang

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • How can i convert data from DBF to oracle database 10g?

    Sir,
    How can i convert data from DBF to oracle database 10g?

    I assume you at least know how to dump the contents of foxpro dbf file into CSV format.
    Regarding SQL*Loader, hope this demo makes it a bit clear to you...
    http://www.princeton.edu/~storacle/sqlloader_demo.shtml
    I agree that it is an old web page (references Oracle 8.0.5) but basics remain the same.
    If it is still unclear to you after referring above link, then get an Oracle consultant.

  • How can i convert this data(00000000) into date format(yyyy-MM-dd)

    Hi,
    i am using this method to convert date format from string.
    public static string FormatDate(string inputDate, string inputFormat)
                System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
                string datepresent = DateTime.Now.Date.ToString("yyyy-MM-dd");
                return datepresent;
    its working properly,
    but when input data is like 00000000 i am getting error this is not valid.
    how can i convert this into date format any help..!

    Have you tried the above code:
    I can see it is working with both Date and DateTime destination nodes.
    Map:
    Functoid Parameters:
    Functoid Script:
    public static string FormatDate(string inputDate, string inputFormat)
    string datepresent;
    if (inputDate == "00000000")
    datepresent = "0000-00-00";
    else
    System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
    datepresent = date.ToString("yyyy-MM-dd");
    return datepresent;
    Input:
    <ns0:InputDateString xmlns:ns0="http://DateFormat.SourceSchema">
    <DateString>00000000</DateString>
    </ns0:InputDateString>
    Output:
    <ns0:OutputDate xmlns:ns0="http://DateFormat.DestinationSchema">
    <Date>0000-00-00</Date>
    </ns0:OutputDate>
    If this answers your question please mark as answer. If this post is helpful, please vote as helpful.

  • How can i convert a data file to mp3 so it can be played ?

    HOW CAN I CONVERT DATA FILE TO MP3

    You cant change a file on a CD/DVD.
    You need to import the contents to iTunes. You can choose the file format to save it as in iTunes Preferences.
    From the menu bar (with iTunes open)
    iTunes > Preferences > General - click the Import Settings button and change the choice to mp3 encoder.
    (Note - that instruction is for iTunes 9.1.1 - if it's changed in 10.x, I trust Klaus or one of the others will correct me).
    When you've set the import encoding, put your CD in and select import (button at bottom right in 9.1, may be in the menu bar for 10.x).

Maybe you are looking for