Intelligent (?!) Date Interpretation

I have a small problem with dates. I have a VB app that uses ODBC/ADO to access an Oracle 8 database, and I'm using a where clause which includes date conditions:
and      ent_dt >= to_date ('10/01/2003', 'dd/mm/yyyy')
and      ent_dt <= to_date ('30/09/2004', 'dd/mm/yyyy')
When the application is run from one box, this is interpreted as ent_dt between 01 October 2003 and 30 September 2004. From another box, it's interpreted as 10 January 2003 to 30 September 2004. To me, that's just plain dumb. I'd far rather I got an error that told me I couldn't have a 9 Dodecaoctember 2004 than have one out of two dates invisibly manipulated. But that's what it's doing, and I need to understand why.
Same SQL, same database, same country (Canada), different clients.
Box A is XP Pro, SP1; box B is XP Pro, SP2
Box A is MS ODBC version ???, box B is same driver but likely a different version
Box A has (likely) the Oracle 8 client installed, box B has 9i and 10g installed, with the default home set to 9i.
This looks to me to involve NLS, but I'm not sure just which component is causing the difference.
Any ideas?
Robert Smith

I have a small problem with dates. I have a VB app
that uses ODBC/ADO to access an Oracle 8 database,My doubt is your client machine has different configuration for date format at Windows level. did you make sure your VB App is always passing the date in same format and same value from both the clients.
Thanks,
Dharmesh Patel

Similar Messages

  • Data interpreter for loading of DASYLAB data into DIADEM

    Can NI deliver a data interpreter for loading DASYLAB data into DIADEM?

    Hi zzzz,
    It is my understanding that DasyLab has the ability to write DIAdem *.DAT files. This I have gathered from the fact that US customers have sent me *.DAT data files generated by their DasyLab version, in which several properties are called by their German names. So I assume the DasyLab *.DAT file output was originally written for a German audience, but the data made it over just fine. I suppose that could have been a special feature of their particular DasyLab, but check if you can output *.DAT files with yours. If not, please write back.
    Regards,
    Brad Turpin

  • Date interpretation issues

    I am having some problems with a date query when running on
    different databases. We think that there is a different
    interpretation of the year. One seems to assume 2099(Oracle
    8.0.5) while the other is 1999(Oracle 8.1.6).
    This is the sample query that we are running:
    SELECT DISTINCT Restrictions.* FROM Restrictions WHERE (EndDate
    = '18-Oct-01') AND (BeginDate <= '31-Dec-99') Where is the difference coming from in the interpretation of the
    year? What should we do to ensure that the interpretation is the
    same across the different databases?
    Thanks,
    Dave Buckley

    If you select name, value from v$parameter where name like '%
    nls%';
    you will see nls_date_format = DD-MON-YY or DD-MON-RR. The
    queries you are using use an implicit date conversion like
    TO_DATE('01-JAN-99','DD-MON-YY') or 'RR' depending on the
    NLS_DATE format.
    This is an implicit data conversion done by Oracle. It is
    better to utilize the TO_DATE format and this will elivate your
    issues.
    Otherwise, you can set the NLS_DATE_FORMAT in the init.ora or at
    the session level. ALTER SESSION SET NLS_DATE_FORMAT='';
    Look at the TO_DATE function for the valid date formats.
    Good luck!
    Brad

  • JAI dct data interpretation

    DCT transforms data form space domain to frequency domain.
    I 've appliet JAI dct operator to an image.
    Then, i tried to inspect the values of the dct output:
    This is my code:
    final String filename = "sample\\viola.jpg";          
              RenderedImage src = (RenderedImage)JAI.create("fileload", filename);
              int width  = src.getWidth();
              int height = src.getHeight();          
              ParameterBlock pb = (new ParameterBlock()).addSource(src);
              PlanarImage dct = JAI.create("dct", pb, null);     
              int w = dct.getWidth();
              int h = dct.getHeight();
              // obtain information in frequency domain
              int dctData[] =
                   dct.getData().getPixels(0, 0, w, h, (int[])null);
              double[] pixels = new double[dctData.length];
              for (int i = 0; i < w; i++)
                   System.out.println(dctData[i] + ", ");Now, i want to say, if there's a way to interpret this result and,
    for understand what they means.
    For example, first dct data otput are the follow integers: 51518, 52896, 54628...
    Then, i want to say what happens if i set to 0 the dct data falling within a certain range, (thus removing some frequencies), and i re-apply dct...

    Hi,
    In MD04 0001 is nothing but schedule line, if the item contains several schedule lines then you can observe the difference. or select the line in MD04 and click on details button you can observe the sequence of order number, item number and schedule line number.
    Hope this will answer your question, if yes reward points.
    Venkat Cheedalla

  • Date transfer between 11g BPMN Process and Human Workflow task

    I'm creating a small BPMN process in SOA Suite 11g. Pretty simple: Holiday Request where one enters name, start date, end date and leave type (e.g. annual). The odd thing is, any dates I enter into the process end up losing one day when viewed in the BPM Worklist.
    So, to be clear:
    * The BPMN process receives a message like this (note the +10:00 -- I'm running this in Australia):
    <RequestData>
    <name>JohnJames</name>
    <startDate>2010-06-21+10:00</startDate>
    <endDate>2010-06-21+10:00</endDate>
    <leaveType>annual</leaveType>
    </RequestData>
    * It does some minor processing, then passes this onto a Human Workflow task (exactly the same):
    <RequestData>
    <name>JohnJames</name>
    <startDate>2010-06-21+10:00</startDate>
    <endDate>2010-06-21+10:00</endDate>
    <leaveType>annual</leaveType>
    </RequestData>
    * When I open the task in the BPM Worklist app I see this:
    name : JohnJames
    startDate : 20/06/2010
    endDate : 20/06/2010
    leaveType : annual
    So, why? My processing code doesn't alter the dates in any way at all before passing them to Human Workflow. I figure this has something to do with locales used by HW but I can't figure out where or what to change. Any clues? Comments? Ideas?

    OK, I have a solution that works for me: YMMV. There's two parts to it:
    1) To have the dates interpreted correctly, I changed the fields on the generated forms for the Human Tasks. The Start Date and End Date fields were created as Input Text fields with the "Converter" property set to <default>. I changed the fields to Input Date fields instead, and the dates were interpreted correctly (i.e. May 21 showed up as May 21 rather than May 20) But they still showed up in US date format: 5/21/2010.
    2) To have them formatted for my locale, I added a "formatting-locale" entry to the "trinidad-config.xml" file: <formatting-locale>en-AU</formatting-locale>. The dates then showed up as 21/5/2010.
    This solution doesn't give you dates automatically formatted for your own locale, or different locales based on browser, but it does give me what I want for now. Thought some folks might be interested.

  • All the data getting exported in the first column of csv while exporting

    Hi All,
    In 11.5.10.2, I have a page with advanced table region. Am using OA Framework's export button to export the results.
    But, problem is, All the results are getting exported in the first column of the output .csv file. Why such a behavior?
    Profile Option of 'Export MIME Type' value is text/text-separted-values.
    Any ideas would be of timely help. Thanks.
    Regards, Soorya

    From OAF standpoint, it just exports the data. Data interpretation is completely dependent on client machine and excel setups.
    Please check the Data-->Text to Columns wizard where we can specify the delimiter(s) on excel.
    Not sure if this can be set up in Apps, so that we need not change on every end-user machine.
    Hope this helps.
    -- Thanks

  • External content based SharePoint list date/time information wrong

    So, we have a SQL Server database that contains date/time type data.
    When we look at the info in the database, the date and times appear to be in GMT, which is 5 hours before our time.
    So, we set up views with a DATEADD calculation to compensate for the difference. When we use the view, the dates and times match our timezone info.
    We then set up an external content to our view.
    When the data is displayed in rows and columns, we see times that are 10 hours before GMT.
    We had put in the dateadd calculations because when we had scripts that grabbed the data from SQL Server and put them into text files, the dates and times were all 5 hours off.
    Is there code within the External data connectors (or SharePoint itself) which compensate for the time zones?
    Thanks!

    Hi Iwvirden,
    When you create an External Content Type and External List using the SharePoint Designer, DateTime fields are normalized to UTC using the NormalizeDateTimesetting
    associated with the TypeDescriptor for the DateTime field. This leads to the date field wrong in Business
    Connectivity Services.
    To fix this issue, you can change the normalization to use local time as follows:
    <TypeDescriptor TypeName="System.DateTime"
    Name="DueDate" DefaultDisplayName="Due Date">
    <Interpretation>
    <NormalizeDateTime LobDateTimeMode="Local" />
    </Interpretation>
    </TypeDescriptor>
    Here is a similar thread for your reference:
    Timestamp in Sharepoint external content type not matching value in SQL table
    Here is a detailed article for your reference:
    Why are my date fields wrong in Business Connectivity Services?
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • OSB business service transforming a date column 1936 to 2036 ( 1950)

    Hello, I'v a database view with a normal date column "geburtsdatum".
    Data Dictionary:
    GEBURTSDATUM DATE
    Now with JDeveloper I create a db-adapter. This works fine.
    On OSB I do generate a business service on the just created jca file. Also this works fine.
    XSD for db adapter:
    <xs:element name="geburtsdatum" type="xs:dateTime" minOccurs="0" nillable="true"/>
    I can test this business service successfully, everything is fine, but not the date interpretation when birtdate <1950
    Sample geburtsdatum (birtdate): 29-JUL-1934
    DATABASE: 29.07.1934
    OSB Business Service: 29.07.2034
    Why or where happends this date conversion?
    This is very strange, anyone had the same problem?
    Any help would be appreciated.
    Thanks
    Best regards,
    Reto

    After all I found the solution. Again the problem has been caused on DB side.
    I'm using a view. On this view I had a DATE column with a decode. I think I did a clean TO_DATE casting, but it seems as the OSB DB Adapter did not interpret this correctly.
    (on database side with SQL I did not have any problems here)
    My solution was:
    Using a date returning function (which does my decoding) in my view :
    CREATE VIEW xyz AS
    SELECT ...
    , myPackage.removeMaxDate(n.geburtsdatum) as geburtsdatum
    FROM ...
    Regards,
    Reto

  • Selective Deletion of Infocube data

    BW experts,
    I have a scenario where in "rough" data already stored in an InfoCube will be replaced by a more "intelligent" data from another source. The deletion/replacement of data should happen without manual intervention (cause flat file data files arrive at a schedule time and should be loaded "automatically"into the cube) What are my options here? I currently know that it is possible to delete infocube contents using function module 'RSDRD_SEL_DELETION' (perhaps do it in the Update Rule).
    1) Is there another way (more "SAP Standard" or more "intelligent")?  I need to delete based on characteristics  that can be found in the file (e.g. the file has data for 0MATERIAL, 0CALWEEK).
    2) What are the "watch outs" for using function module 'RSDRD_SEL_DELETION'?
    Please advise.
    Thank you very much.

    Hello Emmanuel,
       In ABAP programe Just used the Infocube Name and the selection condition on what basis you want to delete.
    See Below the code.
    *add the fiscper selection in L_THX_SEL table for seletion of data
    CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = '0FISCPER'.
        CLEAR L_S_RANGE.
        L_S_RANGE-SIGN = 'I'.
        L_S_RANGE-OPTION = 'EQ'.
        L_S_RANGE-LOW = TFISCPER.  "yr data.
    *--this is imortant otherwise data wil not delete
        L_S_RANGE-KEYFL = RS_C_TRUE.
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    **get the selection for company
      CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = '0COMPANY'.
        CLEAR L_S_RANGE.
        L_S_RANGE-SIGN = 'I'.
        L_S_RANGE-OPTION = 'EQ'.
        L_S_RANGE-LOW = VARIANT.
    *--this is imortant otherwise data wil not delete
        L_S_RANGE-KEYFL = RS_C_TRUE.
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    *function module for selective deletion..
    CALL FUNCTION 'RSDRD_SEL_DELETION'
      EXPORTING
        I_DATATARGET              = 'IFIBIV'
        I_THX_SEL                 =  L_THX_SEL
      I_DEL_ACTIV               = RS_C_TRUE
      I_DEL_UPDATE              = RS_C_FALSE
      I_DEL_CHANGE              = RS_C_FALSE
      I_AUTHORITY_CHECK         = RS_C_TRUE
      I_MODE                    = RSDRD_C_MODE-CHOOSE
      I_THRESHOLD               = '0.1'
      I_PARALLEL_DEGREE         = 1
      I_NO_LOGGING              = RS_C_FALSE
      I_NO_COMMIT               = RS_C_FALSE
      I_NO_ENQUEUE              = RS_C_FALSE
      I_SHOW_REPORT             = RS_C_FALSE
      I_TRANSACTIONAL_ODS       = RS_C_FALSE
      CHANGING
        C_T_MSG                   =  L_T_MSG
    EXCEPTIONS
      X_MESSAGE                 = 1
      INHERITED_ERROR           = 2
      INVALID_TYPE              = 3
      OTHERS                    = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Hope This will help.
    In Start Routine there is no disadvantage to delete the data from data package.
    But it depened on the scenario and requirement.
    Regards
    Gopal

  • Interpreter für Laden von DASYLAB-Daten in DIADEM

    Wann stellt NI einen Dateninterpreter zur Verfügung , mit dem Messdaten aus DASYLAB (blockweise abgespeichert) in DIADEM zur Weiterbearbeitung eingeladen werden können?
    At which time NI offers a data-interpreter, that allows loading of DASYLAB-data into DIADEM?

    Please refer to:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000055AF0000&UCATEGORY_0=_317_&UCATEGORY_S=0
    Walter Rick

  • MRP creating delivery date on PO´s by vendor

    Good morning folks,
    I´d like to share my scenario and see if you have something similar.
    Currently we have a planning cicle set on MRP1 one view to restrict PO delivery date on fridays, due our receiving process we cannot receive materials on friday, so our planning cicle is set from monday to thursday, and works fine.
    Now our supply chain area intents to have the following, the chemical vendors deliver only mondays, steel vendors on tuesdays and so on.
    I was looking into Vendor master and we don´t have a specific field to place a planning cycle or planning calendar by vendor, my first guess is that this is a very commom business scenario. I know I can accomplish that just starting to use Scheduling Agreements and setting up receiving dates on monday, but it will bring a huge manual activities..
    Does anyone has the same requirement ? how to make sap to set delivery date on fixed days by vendor or group of vendor as explained above?
    thanks
    Carlos Q.M.

    good afternoon Carlos,
    If I understood correctly, what you need is to setup MRP to force the delivery date in the purchasing documents exactly as you have in the planning calendar (tcode MD25), lets say, you want to receive goods only on tuesdays, then create your calendar with day in the week you want to receive products.
    technically speaking ok, create planning calendar that will be added in the MRP1 and MRP2 views, with the day you want to have the delivery date on Purchase docs.
    then at tcode OMI4, you must have one Lot size with field  "Lot-size indicator" with   "K" - Period lot size as in PPC planning calend., and field "Date Interpretation"  equals to  "1" - Delivery date.
    Assign that to your MRP1 view and make sure your MRP2 has also the same key in the field Planning calendar, under Schedulingtab.
    Run the MRP, you will get what you need.
    Now, you must check the impacts on your current MRP and inventory process, because you may have over delivery for one week in case of holiday or shortage of material depending on the week.
    Will this really be efective in terms of costs and inventory management ?
    what your production area says about that ?
    well, there are many question you must get answer before implement that.
    hope that helps you.
    you can find more details on the following posts.
    http://scn.sap.com/docs/DOC-51912
    http://scn.sap.com/community/erp/manufacturing-pp/blog/2015/01/06/my-bookmarked-documents
    take care
    Carlos Moçatto

  • Date difference when converting Calendar date to sql date

    I am trying to convert a Calendar date to sql date. The only problem in the conversion is sql date adds 1 month to the original date. Due to this my query results show different data than what it is suppossed to show.
    Here is my code
    Calendar startDate = Calendar.getInstance();
    startDate.set(2006, 10, 01, 00, 00); // 1-Oct-2006
    return (new java.sql.Date(date.getTimeInMillis()));
    on the last statement it adds a month to original date. So the final date i get is 1-Nov-2006.
    Any solution to this problem?
    Thanks
    Sameer

    Thanks everyone for quick response.
    I have read javadocs many times but that does not
    change the fact that Calendar and Sql date
    interpretation is different.No, it isn't. You are setting the moth to november when you set the month to 10, and november is what java.sql.Date is showing. So where is the difference? You are doing it wrong and that is why you get the wrong month.
    How the f do you think that the calender should know that you want october when you set it to november?
    My application is deployed through web service and
    the clients may access it through any programming
    langague (java, php, ec). Even I am testing it
    through java and php. Still doesn't matter. You need to subtract the month by one if you want to let your user use 1 for january.
    While testing it through java month is different but
    through php its correct.Read the docs.
    Can smoeone please give me the best possibel solution
    to this?see above

  • Change the currency of Operating Concern COPA

    Hi,
    In my SAP environment there are 4 controlling areas. Only one of them is assigned to Operating concern. The remaining 3 have COPA inactive.
    I would like to extend the existing operating concern to remaining 3 controlling areas, but before I do that I need to change the Operating concern currency as the one currently set is only relevant for only one controlling area and company code which is GBP. I need to change it to group currency - USD.
    When I use F1 help on currency field in Operating Concern settings in configuration, I get information that 'once data has been posted, however, a change in the operating concern currency would cause the existing data to be interpreted as if it were posted in the new currency (for example: USD 1000.00 in old currency -> DEM 1000.00 in new currency).'
    Even though we have transactional data posted in that operating concern , it is not being used by any department and we are quite happy to have existing data interpreted in USD instead of GBP. No reports are being generated in COPA currently so it will not be an issue for us. We want new data to be proper and constistent.
    When I try to change the currency in operating concern config, the field is greyed out. I believe there is  more complex workaround for that, but the only note I found on this is  651142 which says that SAP provides different tools to reorganize operating concern. But no further details are included.
    If anybody managed to change operating concern currency, please help me with that.
    Regards,
    Karol

    Hi Karol
    I read the note given by you.. It asks you to contact the SAP for SLO Service (System Landscape Optimization )
    This is a chargeable service by SAP... In case you decide to go ahead with this, do share your experience with us
    Create an OSS msg and give ref of this note... I would suggest to go with SAP service and not with any one else's experiences... The tools that SAP is talking about are available only with SAP..
    You may try to archive the existing data from COPA tables and then see if the currency field opens up for editing.. Am not sure about it..
    Regards
    Ajay M

  • Call function in debug mode

    Hi,
    when I´m on the test function screen of se37, I can run the function in debugging mode and it´s starting with the debugger on the first code line.
    Is it also call a function from a report in this debugging mode?
    thank you!
    reward points guaranteed

    Thank you for your answers...
    Let me explain a little bit more in detail, what I want to do.
    I have an XML interface function which is going to be called by an
    external application about RFC, reading binary data,
    interpreting that as XML and doing something in the SAP system afterwards.
    As the system is a 4.6C I can´t debug externally, I want to provide
    a debugging function in a monitoring application for that.
    As people are using the monitoring, which are not familiar with all
    the code behind that, I want to start the debugging mode by myself,
    without setting a breakpoint.
    Let me describe it like this:
    When you type in /H in the transaction field in the SAP menu bar, the
    debugging mode is going to be started for further actions.
    All I want to do is starting that /h debug mode without typing anything
    in the transaction field, just inside of the report.
    How can I do that?
    Michael

  • Schedule a VBA macro based DeskI Report.

    Hi,
    We have a requirement to schedule a VBA macro based report via CMC and Infoview and I would like to acheive the below. Please help.
    1) To save the report output as CSV file after refresh in Xi R2 and I have the following code, which runs fine if I run manually, but if I schedule it in Xi R2, it does not run.Please help.
    Private Sub Document_AfterRefresh()
    Dim boDP As busobj.DataProvider
    Set boDP = ThisDocument.DataProviders.Item(1)
    OUTPUT_FILE_CSV = TARGET_FILE_DIR & OUTPUT_FILE_NAME & Format(Now, "YYYYMMDD") & "_" & Format(Now, "hhnnss") & ".csv"
    Call boDP.ConvertTo(5, 1, OUTPUT_FILE_CSV)
    End Sub
    The OUTPUT_FILE_CSV & TARGET_FILE_DIR are declared as global varilable. Please help.
    2) A prompt to be filled and the following syntax works fine when I run the macro manually. But does not work when I schedule in CMC (Variable prevented report to refersh error)..
    Private Sub Document_BeforeRefresh(Cancel As Boolean)
    newfromdate = DateAdd("M", -4, DateValue(Now))
    Application.Variables.Item("BOL Date").InterpretAs = boStringVariable
    Application.Variables.Item("BOL Date").Value = newfromdate
    End Sub
    Please advice.
    Thank You.

    Hi Sundaresan,
    Following are the important points related to scheduling deski report containing VBA macro:
    1. BusinessObjects XI Release 2 supports macros in
        Desktop Intelligence in InfoView, both when viewing or
        scheduling the document, but with caveats.
    2. There are slight differences in the execution flow when
        viewing a Deski in InfoView as opposed to viewing on
        the Desktop Intelligence client.
    3. A restriction on scheduling documents is that the
        scheduler can only open one document at a time u2013 so
        if you have macros that try and access another Deski
       document, it will fail.
    4. Whether a macro executes successfully or not would
        depend on the functionality used in the macro.
    May i know which service pack you are using,as this is known issue and it works fine with BOXI R2 SP2 and higher versions.
    I hope this helps you.
    Regards,
    Snehal

Maybe you are looking for