Get time Zone based on Country code

Hi All,
I am looking for getting the time and date of a particular country based on country code in XI. For ex. if IN comes in payload then get IST (Date and time). Can we do that in UDF?
Thanks & Regards,
Venu V

> I am looking for getting the time and date of a particular country based on country code in XI.
How should that work? Have you thought about Russia? USA?
Check java class Calendar and TimeZone:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Calendar.html
http://java.sun.com/j2se/1.5.0/docs/api/java/util/TimeZone.html

Similar Messages

  • Look-up java time zone based on location?

    I have a test app where I can assign a java timezone and return time info - However, I don't see a way to look-up a java time zone based on location (combination of city/province/state/country).
    Is this possible?

    Has any one found a way to lookup a timezone based on a city/region in the world? So one could be able to type any city and state/province and country combination and get the corresponding timezone for that region. Is there a place where one can buy this data?
    Thank you

  • Nearest time zones based on user time zone

    Hi,
    In my application, user accesses the applet in the browser and based on the user time zone I need to display the list of available server which are near to his time zone.
    Please provide me some hints on how to sort the time zones based on the time zone offset.
    Thanks
    Aravind

    Hi,
    In my application, user accesses the applet in the browser and based on the user time zone I need to display the list of available server which are near to his time zone.
    Please provide me some hints on how to sort the time zones based on the time zone offset.
    Thanks
    Aravind

  • Getting time zone for based on country

    Hi experts,
    I need to create a function module to convert time based on country.
    i.e if user asked to display the US time it should come and if he wants uk it should come .if he enters india time and and want to know us time it should show time in india and usa.time difference should be shown based on the country
    Is there any table where I can get times of all countries?
    I can't use convert function module,
    I need to crearte a function module for this requriement

    check with existing FM
    FUNCTION MODULES
    http://www.erpgenie.com/abap/functions.htm
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    http://www.erpgenie.com/abap/index.htm
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Rewards if useful............
    Minal

  • [Forum FAQ] How to convert data of date time's type stored in database to display Time Zone based on different territories?

    Introduction:
    There is a date’s type field in the database. When using the field in the report, clients want to convert the field’s values based on own Time Zone to show the date field.
    Workaround:
    Currently, Reporting Services doesn’t provide the function that can get the Time Zone of a client machine. To work around the issue, you need to add a custom code in the report to convert Time Zone and create a parameter through which the client users can
    select his/her Time Zone, and then pass the parameter value to the custom function. Please see the details as follows:
    1. Click the Report, select Report Properties and add the custom code as the screenshot shown:
    Custom code:
    Shared Function FromUTC (ByVal d As Date, ByVal tz As String) As Date
    Return (TimeZoneInfo.ConvertTimeBySystemTimeZoneId(d, TimeZoneInfo.Utc.Id, tz))
    End Function
    2. Create a parameter named TimeZone (you can name the parameter according to your requirement), select Available value and click Specify values.
    Label                                                               
    Value
    China Standard Time                                        
    China Standard Time
    Central European Time Zone                              Central European Time Zone
    India Time Zone                                               
    India Time Zone
    United States of America Time zones                   United States of America Time zones
    3. Call the custom code and type the expression to convert the Time Zone as follows:
    =Code.FromUTC(Fields!UTCDateFromDatabase.Value,Parameters!TimeZone.Value)
    Note: If you use the expression “=Code.FromUTC(Fields!UTCDateFromDatabase.Value,TimeZone.CurrentTimeZone.StandardName)”, it cannot achieve the goal because TimeZone.CurrentTimeZone.StandardName gets the TimeZone of Report Server side rather than Client side.
    More information:
    TimeZone Class
    http://msdn.microsoft.com/en-us/library/system.timezone(v=vs.110).aspx
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012

    Hello,
    Please read the answer provided by Kalman on the following thread:
    http://social.technet.microsoft.com/Forums/es-ES/446df85a-7ad8-4891-8748-478a26350c5c/how-to-compare-tables-in-two-different-servers-while-one-of-the-server-name-has-a-?forum=transactsql
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • FM to get open period based on company code

    Could you pls tell me the FM which can get open period based on the company code?
    right answer will be rewared for sure.
    Sujatha

    Hi,
    I m not sure. Just check this out.
    CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
        EXPORTING
          companycodeid = p_bukrs
          posting_date  = p_bedat
        IMPORTING
          fiscal_year   = gd_fiscalyr
          fiscal_period = gd_fiscalp.
    CALL FUNCTION 'DETERMINE_PERIOD'
        EXPORTING
          date                      = p_bedat
    *    PERIOD_IN                 = '000'
          version                   = gd_periv
       IMPORTING
          period                    = gd_fiscalp2
          year                      = gd_fiscalyr2
       EXCEPTIONS
          period_in_not_valid       = 1
          period_not_assigned       = 2
          version_undefined         = 3
          OTHERS                    = 4.
    check this link.
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    Regards
    Vadi
    Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 5:41 PM

  • Getting time zone problem in Vista Please help?

    Aslam-o-Alaikum
    I am using JDk 1.5.0_0.8 on Windows Vista and i am having problem in retreiving correct Time zone. it always returns "Greenwich Mean Time" when i run
    "System.out.println(TimeZone.getDefault().getDisplayName());"
    on vista where as it returns "GMT+05:00" on Windows Xp and all previous versions. Because of this problem i am unable to retrieve current date correctly in Vista where as the same code runs fine in Windows XP. Please help!!!!!!!!!

    I am having a similar problem with JRE 1.4.2_07 and Windows Server 2008. The time zone returned is ALWAYS GMT for the default time. I can work around this by explicitely setting the time zone in my code, but my customer would like a real fix. TZUPDATER seems to have no effect. Any ideas?

  • Get time zone abbreviations

    How to get current time zone abbreviations from oracle?
    Why “select EXTRACT(timezone_abbr FROM current_timestamp) TA
    FROM dual;” Qury returns a ‘UNK’?

    To have a valid timezone abbreviation you need to set a time_zone :
    SQL> select current_timestamp from dual;
    CURRENT_TIMESTAMP
    12/03/07 14:28:10,566726 +01:00
    SQL> select EXTRACT(timezone_abbr FROM current_timestamp) TA
      2  FROM dual;
    TA
    UNK
    SQL> alter session set time_zone = 'cet';
    Session altered.
    SQL> select current_timestamp from dual;
    CURRENT_TIMESTAMP
    12/03/07 14:28:23,702305 CET
    SQL> select EXTRACT(timezone_abbr FROM current_timestamp) TA
      2  FROM dual;
    TA
    CET
    SQL> Nicolas.

  • To get time differnce based on factory calendar

    Dear All,
    We have Creation date, time, End date and time. We need to find out the time difference  based on factory calendar ..ie need to exculde weekends, holidays.
    Is there any FM to get this? Please adivse procedure how to get.
    Thanks
    Konda Reddy

    Try Something like following
    PARAMETERS : P_BEGDA TYPE BEGDA,
                 P_BTIME TYPE SYUZEIT,
                 P_ENDDA TYPE BEGDA,
                 P_ETIME TYPE SYUZEIT.
    DATA LV_DURATION TYPE F.
    CALL FUNCTION 'DURATION_DETERMINE'
      EXPORTING
        UNIT                       = 'H' "Hours
        FACTORY_CALENDAR           = 'GR'
      IMPORTING
        DURATION                   = LV_DURATION
      CHANGING
        START_DATE                 = P_BEGDA
        START_TIME                 = P_BTIME
        END_DATE                   = P_ENDDA
        END_TIME                   = P_ETIME
      EXCEPTIONS
        FACTORY_CALENDAR_NOT_FOUND = 1
        DATE_OUT_OF_CALENDAR_RANGE = 2
        DATE_NOT_VALID             = 3
        UNIT_CONVERSION_ERROR      = 4
        SI_UNIT_MISSING            = 5
        PARAMETERS_NOT_VALID       = 6
        OTHERS                     = 7.
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE LV_DURATION.

  • SRM 7.0 , Get company name based on company code

    Hello friends,
    Is ther any function module or table to read company name based on company code in SRM 7.0 ?
    Kindly let me know your inputs.
    Thanks.
    Preethi.

    Hi,
    To find purchase group.
    BBP_OM_FIND_PURCH_GRPS_BEI
    To fund purchase org.
    BBP_OM_FIND_PURCH_ORGS_BEI
    To find company.
    BBP_OM_FIND_COMPANIES
    Regards,
    Pedro Marques

  • Received appointment gets time zone wrong

    I received an appointment invitation from EST time zone and I'm in PST. The creator made a calendar item (in whatever application) for 10AM EST and invited me to it. I accepted, and Calendar placed at at 10AM PST rather than 7AM. There was to way to check the time zone of the request - it's not there. Naturally, I miss the appointment.
    I go to figure out what went wrong. The calendar and email are gmail accounts. I go to check how the appointment looks on the web calendar, and it's at 10AM, but it says that I edited it, and would I like to fix it to be correct? I agree, and it pops the appointment to 7AM.  Apple Calendar changed the time from 7AM PST to 10AM PST.
    How can I see the time zone of the invite? How can I prevent it from being changed?

    I looked at the invite file, and it clearly has the time zone in it.

  • To get address numbers based on building code

    Hi All,
    Here is my requirement.
    I need to select all address numbers from ADRC table based on building code.
    For instance, say I want all address numbers where building code = ABC.
    I can write a simple inner join query between ADRC & ADCP.
    But the problem is, the ADRC table can have multiple address numbers. Say,  for a specific Partner number & Person number, the ADRC table has following 3 entries. Lets say 3rd one is valid.
    Addr 1 = XYZ'.
    Addr2 = 'ABC'.
    Addr3 = 'MNO'.
    Now if I use that select query, it will fetch the second one, though it is the older one which is not valid anymore.
    Is there any fields in ADRC with which we can decide which is the recent valid address number?
    Kindly provide your valuable help for this scenario.

    Is there any fields in ADRC with which we can decide which is the recent valid address number?
    Would DATE_FROM and DATE_TO fields help you with validity of the address?

  • To Get Clander Id based upon company codes....

    hi all,
    i need to get the calender id based upon the company code.. is there any table for that...
    Example:  1000 for US,
                  2000 for CA(canada).
    helpfull answers will be rewarded...
    Regards,
    Murali.

    Hi guys.
    Murali, I apologize for this inconvenient (Im using your post)..but I cant make any post since today (with new sdn version)  
    pd: this is a test to check if I can post in an already created thread.

  • To get the amount based on the code

    hi all,
    i am using db10g.
    i have a query like below
    SELECT SUM(EID_AMOUNT),EID_INCR_CODE,EIH_EFF_DATE
    FROM EMPLOYEE_INC_HEADER,EMPLOYEE_INC_DETAILS
    WHERE EIH_EMP_CODE = EID_EMP_CODE
    AND EIH_EFF_DATE = EID_EFF_DATE
    AND EIH_EMP_CODE = '0026108'
    GROUP BY EID_INCR_CODE,EIH_EFF_DATE
    ORDER BY EID_INCR_CODE,EIH_EFF_DATEcurrently i am getting result set like this
    SUM(EID_AMOUNT) EID_INCR_CODE   EIH_EFF_D
                500 BASIC           01-JAN-09
                750 BASIC           01-MAY-09
                300 HTRAN           01-JAN-09
                500 HTRAN           01-MAY-09
                200 OTHERS          01-JAN-09
                350 OTHERS          01-MAY-09but i want to get the out put like
    SUM(EID_AMOUNT) EID_INCR_CODE   EIH_EFF_D
               1250 BASIC           01-JAN-09
                800 HTRAN           01-JAN-09
                550 OTHERS          01-JAN-09in otherwords i want get sum of amount for that incr_code and effective date will be the minimum date amoung which the data is fetched(in the example out of six resulted record '01-jan-09' is the least data).
    is there is any way where i can acheive the above?
    Please help..
    Thanks..

    Maybe
    select the_sum,
           EID_INCR_CODE,
           EIH_EFF_DATE
      from (SELECT SUM(EID_AMOUNT) over (partition by EID_INCR_CODE order by EIH_EFF_DATE) the_sum,
                   EID_INCR_CODE,
                   EIH_EFF_DATE,
                   row_number() over (partition by EID_INCR_CODE order by EIH_EFF_DATE) rn
              FROM EMPLOYEE_INC_HEADER,
                   EMPLOYEE_INC_DETAILS
             WHERE EIH_EMP_CODE = EID_EMP_CODE
               AND EIH_EFF_DATE = EID_EFF_DATE
               AND EIH_EMP_CODE = '0026108'
    where rn = 1
    ORDER BY EID_INCR_CODE,EIH_EFF_DATEor
    SELECT SUM(EID_AMOUNT) KEEP (DENSE_RANK FIRST ORDER BY EIH_EFF_DATE) the_sum,
           EID_INCR_CODE,
           EIH_EFF_DATE
      FROM EMPLOYEE_INC_HEADER,
           EMPLOYEE_INC_DETAILS
    WHERE EIH_EMP_CODE = EID_EMP_CODE
       AND EIH_EFF_DATE = EID_EFF_DATE
       AND EIH_EMP_CODE = '0026108'
    GROUP BY EID_INCR_CODE,EIH_EFF_DATE
    ORDER BY EID_INCR_CODE,EIH_EFF_DATERegards
    Etbin
    Edited by: Etbin on 13.11.2011 13:41
    aggregate solution added

  • How get current time zone offset ?

    Hi,
    I am facing to a problem related getting time zone offset.
    Below code is used for my application :
    NSDate* sourceDate = [NSDate date];
    NSTimeZone* destinationTimeZone = [NSTimeZone systemTimeZone];
    timeZoneOffset = [destinationTimeZone secondsFromGMTForDate:sourceDate] / 3600;
    But sometimes seems that above code is getting work wrong. For example :
    Knoxville, TN : time zone offset should be -5. But my code resulted it as -4.
    http://www.timeanddate.com/worldclock/city.html?n=843
    This web is related my issue. Here is :
    Standard time zone: UTC/GMT -5 hours
    Daylight saving time: +1 hour
    Current time zone offset: UTC/GMT -4 hours
    Actually I don't know how get to "Daylight saving time:".
    Can you correct this issue for me ?
    Please advice.
    Thanks.

    Hi Raiden -
    RaidenMAC wrote:
    Knoxville, TN : time zone offset should be -5. But my code resulted it as -4.
    I think your code is giving you the correct offset for Knoxville on today's date. The offset for Eastern Standard Time (EST) is -5, but Knoxville is currently on Eastern Daylight Time (EDT), which is one hour later than EST. (-5) + 1 => (-4), which is what your code computed.
    Note that [secondsFromGMTForDate:|http://developer.apple.com/library/ios/documentation/Co coa/Reference/Foundation/Classes/NSTimeZoneClass/Reference/Reference.html#//appleref/doc/uid/20000190-CACDIAIC] is correcting for daylight savings time. That's why you need to pass the date to that method. If you pass a "summer" date, the return offset will be one hour more than it will be for a "winter" date (usually early November to mid March). For example, try moving the date forward 60 days like this:
    NSDate *sourceDate = [NSDate dateWithTimeIntervalSinceNow:3600 * 24 * 60];
    NSTimeZone* destinationTimeZone = [NSTimeZone systemTimeZone];
    int timeZoneOffset = [destinationTimeZone secondsFromGMTForDate:sourceDate] / 3600;
    NSLog(@"sourceDate=%@ timeZoneOffset=%d", sourceDate, timeZoneOffset);
    The above should give you the offset for Knoxville on Dec. 7, 2010, which is a winter date.
    Actually I don't know how get to "Daylight saving time:".
    You can test a NSTimeZone object with [isDaylightSavingTimeForDate:|http://developer.apple.com/library/ios/documentat ion/Cocoa/Reference/Foundation/Classes/NSTimeZoneClass/Reference/Reference.html#//appleref/doc/uid/20000190-CHDCJGHE], but you don't need that information when you obtain the offset with secondsFromGMTForDate:.
    - Ray

Maybe you are looking for

  • Photos app doesn't show my shared albums and activity

    I've just installed the new Photos App and so far so good, until I try the shared tab. cleanest place on my Mac. I can still access it from iPhone but now I'm not sure whats going on. is my iPhone late in cache? is my Photos Mac going to overwrite my

  • RMI server appears to deadlock but is fine after...

    I have a RMI server that is providing services to clients on my network. When I run tests from the clients (an app that constatnly makes demanding method calls to the RMI server) everything runs fine. I have one Windows 2000 client and one Slackware

  • WD4A Dynamic programming

    In my web dynpro application, I'm using 2 ALV components usage. 1 to display a list of articles according to the selection-criteria. 1 to display the quota scale of the selected article of the first ALV. I could seperate the logic in different WD com

  • JFrame close all windows and send to front

    2 JFrame questions: 1. Is there a way to keep JFrames above all other windows? For example, if a frame was on the screen and Internet Explorer opened, the frame would stay on top of the Internet Explorer window and would still be on the screen. 2. is

  • Isight shutter clicking in & out of focus

    why does this happen? the isight shutter clicks once every two seconds and with every click it goes in focus, out of focus, in focus, out of focus... I'm using it with Evo Cam software, and it's been working fine all morning, and now this. cheers Boy