Date Conversion from GMT to Local and Local To GMT considering DST.

Hi,
I have a application which displays the time in GMT across all the screens,and saves in Local/Default TimeZone as application would be deployed in europe and India.I have written a utility which does the conversion.
I just want to know that how to handle the Daylight Saving Time[DST] as we are taking the data from database and converting it to LocalTime Zone.This works fine but what would happen if the sever time is changes due to DST.There would be problem between the object saved before the DST and after DST because we are simply converting stored time to GMT to show on the screen.
Please share if you some solution/suggestions.
Thanks.
Akash.

YoungWinston wrote:
jschell wrote:
That statement is phrased oddly.
A java.util.Date uses a UTC offset with millisecond resolution.
A jdbc driver converts that value into a "correct" value for the target database.And from.
The form that is stored in the database is entirely database dependent. The actual form stored in the database can take many forms.True, but it is highly likely to be an offset from some "epoch" (Progress, for example, uses 00:00:00 1/1/-3714 UTC as I recall, and has 1-second granularity).Yes but as I said the phrasing was odd. A timestamp, by definition, must be an offset of something. Doesn't matter how it is represented. After all the year 2009 is an offset in the Gregorian calander.
However in terms of actual storage the way it is stored is unlikely to be similar to what Java does. As examples neither Oracle nor MS SQL Server uses a single numeric offset.
It might not even have a concept of timezone.Again true, although I've yet to come across one; and since OP is only concerned about the timezone in Java I'm not quite sure how relevant that is.
Relevant in terms of the description in terms of what java does, what the database does and how it gets from java to the database.
I would also expect any JDBC driver that cannot translate to or from a Java date correctly to document the fact in 60-point bold type, since it's a violation of the implied contract of ResultSet.getDate().Except that depends on your definition of "correct".
Examples of that
- Oracle doesn't have millisecond resolution at all in its common format.
- MS SQL Server doesn't have the same resolution as java, instead there is an odd resolution (one three-hundredth of a second).
- MS SQL Server doesn't have timezones, so if you don't take care and your data crosses timezones the timestamp will be different.
The drivers will not warn you of things like that. At least not that I have seen.
Format for Oracle.
[http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:77562635789106]
Format for MS SQL Server
[http://msdn.microsoft.com/en-us/library/aa258277(SQL.80).aspx]

Similar Messages

  • How do i do data conversion from 11.0.3 to 11.5.10?

    Hi to all,
    If any body have any approach how to do data conversion from 11.0.3 to 11.5.10 release?
    Thanx in Advance

    ajones2 wrote:
    I got the update to work but there seems to be one thing that does not work
    I'm anxious to install 4.5 as well because I understand the music player features a sound equalizer, but I believe it's not prudent to get it from somewhere other than your carrier.  I could be wrong, but I think that each carrier tweaks the OS in some fashion...
    Does your 4.5 have the sound equalizer ?
    George from Bedford, TX
    8120 on T-Mobile with BB Unlimited Email+Internet but
    without the BlackBerry Enterprise service

  • Data conversion from 212 format

    I found a problem during conversion data.
    I have a file which contains ASCII characters (in fact they're look
    like ASCII on any editor) . I have to convert them to integer but I
    know that data are organised into pairs of 12bit numbers packed into
    byte triplets (format 212).
    I made some vi (which convert 2 following ASCII characters to binary,
    then divide them to pairs of 4bits, then some rotation etc..) but the
    whole conversion takes too much time (64kb file conversion is taking
    approx. 1minute).
    Thank you for any suggestions,
    Michael ([email protected])

    Dear Michal,
    I hope this vi work faster.
    Input: 3bytes, data type unsigned int (U8)
    Output: 2 values, data type integer. (INT16)
    of course read all file to memory. Don't read everytime from file by 3
    bytes.
    Deniss
    ps. vi i send by e-mail.
    "Michal Szaj" wrote in message
    news:[email protected]..
    > On Wed, 18 Sep 2002 02:27:25 GMT, Greg McKaskle
    > wrote:
    >
    > >This is one of those things that is quite sensitive to how it is coded.
    > > If you make your VI available, others, including myself can give you a
    > >hand with speeding it up.
    > >
    > >As for guessing at what might be going on, first look at the array wire.
    > > If you are using locals or property nodes to access the a
    rray, that is
    > >the cause. If the array is written to a global and later accessed via
    > >the global, that is causing it.
    > >
    > >I suspect that the bit manipulations on 64K should take something like a
    > >few seconds.
    > >
    > >Greg McKaskle
    >
    > Thank you for your support.
    >
    > In this case I have only one vi and I don't use any global/local
    > variables.
    > At the beginning of the vi I load all text character from file to
    > memory and then I'm making further operations.
    >
    > If it helps I can send the vi with data file.
    >
    > Thnx,
    >
    > Michael ([email protected])

  • GL Data Conversion from Legacy to Oracle EBS

    Hi All,
    I am tasked with converting legacy data into GL. I have worked on other conversions like supplier, AR and AP conversions but never worked on GL conversion, so I don't know how and where to start, what are the pre-requisites for entering data into gl_interface table how to ensure that data is correct in the .csv file etc.
    Kindly request you all to guide me in right direction. Hope to hear from you all very soon!!! :)
    Regards

    Hi,
    When you talk about GL-Data it is the trial balance to be loaded from legacy to oracle applications.
    You can use Web-ADI to upload it ,the check list are
    The balance for each account comibnation in the legacy system to be mapped to GL-Oracle code combination balance
    With respect to open AR, AP Invoices if the invoices are converted using a control account for migration in GL then
    the the balance transfered from AP,AR need not be reversed in GL from the source receivables and payables.
    In case if the same account combination are for migrating the balances from AP,AR to GL ..Then the balances transferred from AP,AR should be reversed ..so that it does not affect the TB-GL-Balance
    Finally ensure that the balance for the TB-tallys with your legacy system and upload it using Web-ADI ,import and
    review and post it.
    Hope this points helps your GL-Data conversion.
    Regards,
    Ramaa

  • Date conversion from Excel to the SAP format

    Hi,
    I have created a BDC program which uploads daat from Excel sheet.
    There is a date field also, the format of which can be any as per the end user (it will be one of those allowed by SAP).
    However, the file will be used for execution by another user who may have a date setting which is different than that from the one in Excel.
    Eg. End User's date format: DD.MM.YYYY, SAP User's date format: MM/DD/YYYY
    So, how do I convert the date format from excel to the format which will be accepted by the transaction during the recording?
    Regards,
    Dave

    Hi Dave,
    I have faced the same issue while uploading the date to the bdc.
    if ur date format is DD.MM.YYYY in the excel file, first of all you need to change this to dats format ie YYYYMMDD ie character8 format and pass to the bdc, it will automatically convert to sap format
    ie you need to convert splitting at .
    data lv_date type char10,
            lv_dd type char02,
            lv_mm type char02,
           lv_yyyy type char04,
    v_date type char08.
    lv_date = '30.12.2011'.
    split lv_date at '.' into lv_dd lv_mm lv_yyyy.
    if strlen(lv_dd) lt 2.
       concatenate '0' lv_dd into lv_dd.
    endif.
    if strlen(lv_mm) lt 2.
       concatenate '0' lv_mm into lv_mm.
    endif.
    concatenate lv_yyyy lv_mm lv_dd into v_date.
    "Please use the variable V_DATE to populate to ur bdc"
    Edited by: Rahul Babukuttan on Aug 11, 2011 5:35 PM

  • Data load from R3 is slow and gives rfc connection error

    Hi all, is there any debug capabilties available on BI 7.0 when it comes to debug data load from R3 using rfc connection ( aleremote and bwiremote users )
    any ideas where can I look for solution.
    thanks.

    Hi,
    Check the connection between the R/3 and BW.
    or It may be the network problem contact system admin or basis people.
    thanks,
    dru

  • Data Flow from Source systemside LUWS and Extarction strucures

    Hi
    Can Anybody Explain the Data flow from Source system to Bi System .Especially I mean the Extract Structure and LUWS where does they come in picture ,the core data flow of inbound and out bound queues .If any link for the document  would also be helpful.
    Regards
    Santosh

    Hi See Articles..
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    Data Flow from LBWQ/SMQ1 to RSA7 in ECC (Records Comparison).
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/enterprise-data-warehousing/data%20flow%20from%20lbwq%20smq1%20to%20rsa7%20in%20ecc%20(Records%20Comparison).pdf
    Checking the Data using Extractor Checker (RSA3) in ECC Delta Repeat Delta etc...
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/80f4c455-1dc2-2c10-f187-d264838f21b5&overridelayout=true 
    Data Flow from LBWQ/SMQ1 to RSA7 in ECC and Delta Extraction in BI
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/d-f/data%20flow%20from%20lbwq_smq1%20to%20rsa7%20in%20ecc%20and%20delta%20extraction%20in%20bi.pdf
    Thanks
    Reddy

  • Data conversion for communication between Java and C/C++ program

    The real problem, i guess, is about data type conversion between Java and C programs. For instance, and int is supposed to be 4 bytes in Java, and also in C/C++. But, as far as I know, the size of and int in C depends on the processors architecture, so if it were a 64 bit arch., size of and int, double, etc. in C, would change. The real scenario would be a communication between a 32 bit machine (Java) and a 64 bit machine (C/C++).
    First of all, is this assumption correct?
    If so,
    how is it possible to deal with this problem in Java?
    Is there any way to know 'type length' automatically? or
    would it be necessary to modify the Java program to work with a C program in 32-bit or 64-bit arch?
    thx in advance

    cotton.m wrote:
    Yes you should develop the C part of the protocol first and then build from there.
    See http://forum.java.sun.com/thread.jspa?threadID=5243547 for a previous discussion of this topic.
    I understand what you mean, also the topic you referenced. I will explain the situation a bit more. The protocol is already defined: (16 bits message size, 16 message id, 32 bit time, etc.); it is also defined in C (structures and so on). So it would be easy to write my Java code using the specified protocol in bytes, and C types wouldn't be necessary to be considered. But, let's say that the C code can't be modified, and I thought (and don't know yet if its correct), that size of C types CAN changed depending on architecture. So if size changes for C types (code is specified in short, int, etc, and not in bit format), it all would be a mess, if I don't implement something in my Java code.
    cotton.m wrote:
    I don't believe that 32 or 64 bit enters the equation here at all.Maybe 32 o 64 doesn't mind, but sparc or PC could take a point here. Communication would be between a sun solaris sparc and windows x86 PC. But if type size in C/C++ does not change, I wouldn't really have any problem then...
    The situation is not ideal, I know, but is what I have; and I think I could have problems if I run the C program in other machines; so I would have to try to solve it whithin my Java Program.
    I hope it is clear now what I need.
    thx
    Edited by: MGasa on Jan 16, 2008 1:51 AM

  • Date conversion from mm/dd/yyyy to 'yyyymmdd'

    Hi,
    I want to convert the 'mm/dd/yyyy' to 'YYYYMMDD'.
    l_endlate = '12/17/2006'
    gw_flatfile-zzenddate format is 'YYYYMMDD'
    The following function module has error.  I think the dype is not right.  What should I put there?   Or do you have better suggestion?
        CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
          EXPORTING
            datum = l_enddate
            dtype = 'DATS'
          IMPORTING
            idate = gw_flatfile-zzenddate.
    Thanks,
    Helen

    Hi,
    You can use the following code:
    *-Local variables-
      DATA: lf_length TYPE i,
                ex_date TYPE char10,
                in_date TYPE begda
    *-Local constants--
      DATA:lc_8 TYPE char1 VALUE '8',
           lc_9 TYPE char1 VALUE '9',
           lc_10 TYPE char2 VALUE '10',
           lc_0 TYPE char1 VALUE '0',
           lc_limit TYPE char1 VALUE '/'.
      lf_length = STRLEN( ex_date )."Length of the external date field.
      IF NOT ex_date CA lc_limit.
       MESSAGE 'wrong format' TYPE 'E'.
      ENDIF.
      CASE lf_length.
        WHEN lc_8.
          IF ex_date1(1) EQ lc_limit AND ex_date3(1) EQ lc_limit.
            CONCATENATE ex_date+4(4) lc_0 ex_date(1)
            lc_0 ex_date+2(1) INTO int_date.
          ENDIF.
        WHEN lc_10.
          IF ex_date2(1) EQ lc_limit AND ex_date5(1) EQ lc_limit.
            CONCATENATE ex_date+6(4) ex_date(2)
             ex_date+3(2) INTO int_date.
          ENDIF.
        WHEN lc_9.
          IF ex_date1(1) EQ lc_limit AND ex_date4(1) EQ lc_limit.
            CONCATENATE ex_date+5(4) lc_0 ex_date(1)
             ex_date+2(2) INTO int_date.
          ELSEIF ex_date2(1) EQ lc_limit AND ex_date4(1) EQ lc_limit.
            CONCATENATE ex_date+5(4) ex_date(2) lc_0
            ex_date+3(1) INTO int_date.
          ENDIF .
      ENDCASE.

  • Data acquisition from SPCM-AQRH-15 and Nano-ViewTM 200-2/M

    I am trying to acquire data from APDs (PerkinElmer, SPCM-AQRH-15) and Nanopositioner (Mad City, Nano-ViewTM 200-2/M). The second equipment has USB 162 or 202 digital interface integrated but I am not sure abut the first one since I am still waiting my order. anyway, I want to control/communicate with both of them using your product, does anyone know what software and hardware I need? thanks.
    Solved!
    Go to Solution.

    Hello Confuciusl,
    I have been looking into the problem
    statement that you gave us above and have some questions for you as well as
    some answers. I am going to go with the basic understanding that we will be
    using LabVIEW to not only communicate with your devices, but also for data
    acquisition and analysis.
    In reference to your APDs (PerkinElmer,
    SPCM-AQRH-15), I have looked at the data sheet for the product located here,
    and have determined that the best method of communication with your device
    would be to use some type of Counter/Oscilloscope card in a PCI/PXI standard.
    This will allow for proper recording of your signal from your Output Terminal.
    For more information on cards please refer to this link.
    As for the second instrument listed, the
    Nano-ViewTM 200 from MadCity, it mentions here that The Nano- View/M™
    system includes the Nano-Drive™ controller and is compatible with user written
    LabVIEW software. Since we do not have the capability to obtain the product you
    are specifically trying to communicate, the best option at the moment would be
    to try and contact MadCity and see if they have any specific Instrument Drivers
    pre-built for LabVIEW that will allow you to communicate with your device. If
    they do not, the next option would be to develop your own by following the
    guidelines at the following link.
    Thanks again and have a great day!
    Regards,
    Nicholas K
    National Instruments
    Applications Engineer

  • Date conversion from YYYYMMDD to DD.MM.YYYY

    Hi,
    I'm trying to load some data from a flat file into BW. I have a date column in the CSV file that has the date in YYYYMMDD format. when I load it into Bw, I want to change the format to DD.MM.YYYY .
    I have written a small routine that should do this, but it doesn't seem to work.
    data:v_date like sy-datum,
    v_date1(10) type c.
    Concatenate v_date+6(2) '.' v_date+4(2) '.' v_date+0(4) into v_date1.
    RESULT = V_DATE1.
    The result of this routine is YY.YYMM.DD instead of DD.MM.YYYY.
    Can anyone tell me where I'm going wrong?
    Thanks
    Sam

    Hi Keshu,
    When I add the loop to my code, it doesn't seem to work. It gives me the following error:
    does not match the user-dependent date format --> long text
    Diagnosis
    does not correspond to the date format that is assigned to the current user ASDSAD.
    System Response
    The date cannot be converted; the process was terminated.
    Procedure
    Enter the conversion exit RSDAT for automatic date format detection.
    Any suggestions?

  • Name of the data file from a user prompt and a constant

    I have following situation:
     The event is single shot, each shot the two DAC card acquires 8 channel data (total 16 channels) and the user has to decide if we want to save the data in a file.
    Once we decide that we want to save the data, the program should prompt for a file name. The inpu will be some dgit corresponding to an event number let us say xxxxx.
    The program should create a file name 133Axxxxx.dat (or any other extension). 133A and 133B will be my two devices dev1 and dev2 respectively.
    Can some one please help, how do we do this? The data from each card should go in a different file. The file name should be 133Axxxxx.dat and 133Bxxxxx.dat (let us say)
    Ajay Singh

    I think this is what you want.  If not it should be close enough so you can modify easily.
    Matt
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
    Attachments:
    saveFilePath.vi ‏24 KB

  • Data conversion from legacy : through BOM or recipe for a process industry?

    Hi all
    I am working on  data migration document for BOM , ROUTING, PROD VER. My question is whether during migration from legacy we should first migrate the Recipe and add the comp no for creating BOM in mass creation , Or that we should bring the BOMs directly from the legacy? Which method is better from strategic point ?

    Hello,
    for migration into CRM I would suggest the 'XIF-Interfaces'; these are interfaces provided in CRM for connection to external systems. I'm not sure if this will cover all objects mentioned above, but at least some of them should exist.
    Some information about existing interfaces can be found in the integration repository under http://ifr.sap.com/index.html; from the start screen first select 'Enter the repository' and then have a look under 'generic components' and 'SAP CRM'.
    Regards, Katja Ohliger

  • Data fetch from table without Refresh and without using tab key.

    hi Friends,
    I have a problem i want to extract data from table without Refresh into text field without using Tab key. when i'll enter any value in a text field then corressponding value should come in to corressponding textfield without using Tab Key.
    eg. when i enter emp_id 101 in a text field then the first_name and last_name ,adress should come in to corressponding text fields without refresh and without using Tab key.
    How Can I do this.
    Thanks
    Manoj

    Hi Manoj,
    I assume that this is similar to: Data fetch without Refresh rather than Re: Value of one textfield should come into another textfield Without Using TAB ?
    If so, the only change you need to make on the first one is to use "onkeyup" instead of "onchange" in the item's "HTML Form Element Attributes" setting.
    Note, however, that the user must move away from the item at some point (for example, to click a button), so the onchange will be triggered anyway.
    Andy

  • Data conversion from legacy to SAP

    Hi
    I am put on covnersion of legacy data and given options to use the one of the following tools
    LSMW
    CATT
    DTW
    I am new to all this. I have to migrate the following data
    GL Master
    GL Open Balance
    AP Master Data
    AP Opn items
    Fixed Asset Master
    Fixed Asset Balance
    Proft Centers Master Data
    cost Center Data
    Can youspecify which of the tools is most suitable for the conversion in each case?
    please can anyone reply?
    EMENEM

    CATT is not a Data Uploading tool. It will work till 4.7EE.
    You cannot see CATT after 4.7EE.
    If the Data is bulk then Go for BDC (Batch data Communication) Else use LSMW (Legacy System Migratration Workbench)
    again it Depends on your Requirement and your Perfectness.

Maybe you are looking for

  • Install Software HANA unable to read repository

    Hello, I'm new to Eclipse. I'm trying to get up the trial Cloud environment for SAP HANA. I have Eclipse Juno installed. When I attempt to do an install of the HANA software on top of Eclipse I receive error "Unable to read Repository". We do not use

  • I have an iMAC

    I have an iMac upgraded to a 10.6.8, 2 years ago.  We aren't computer savy but have gotten along with this one well. I wanted to make the words larger on screen when we read our emails and such.  I went to the window button on the top row pushed it a

  • Does anyone know how to invert the selection of thumbnails in Reader / Acrobat?

    Please help me, Does anyone know how to invert the selection of thumbnails in Reader / Acrobat?

  • Hypertext Link Data Format

    I want to be able, from a request's column to access a certain URL, for example, suppose I have a column in the database that has URL data in it, and I want the user to be able to access the URL from the report. I know i can use the 'Hypertext Link'

  • Pricing Procedure in PIR

    Hello All, I have created new pricing procedure, configured schema determination and all. The right pricing procedure is being picked-up in PO/Contract. I am wondering that this is not happening in Purchase Info Record. Any suggestion/comments on thi