Converting System Time Stamp to Unix Time Stamp

Hi All,
  I have a requirement to Convert System Date to Unix Date format.Can any one let me know how to convert system date to Unix Date format. Like function module or any other method.
Regards
Anil Kumar K

Hi,
I dont know if is this what you want:
http://javascript.internet.com/math-related/unix-date-time-converter.html
Hope it helps!

Similar Messages

  • Need function module to convert system time to local time

    Hi Experts,
    Need function module to convert system time to local time.
    i.e country specific that to in HH:MM format.
    Thanks in advance.

    Dear Prince,
    Kindly check the following link which contains the list of function modules for date and time conversion.
    [http://www.sap-img.com/abap/date-month-pop-related-function-modules.htm]
    Regards

  • Convert system time into User local time.

    Hi,
    How to convert System time into User Local time.
    Are there any FMs available.
    Regards,
    Kiran

    hi,
    There is just one simple funda behind the Date and time logic in SAP.
    -> It is absolutely useless to store Date and time directly in DB. Why ?
    Because 00:00 a.m in London could mean 05:30 in India !! So If I (in India) store a Date 1st Feb 2008 , 10:00 a.m .. This time for a person in London could be invalid.. because he is behind your time zone..
    So the solution is to store the date/times in Timestamps format. Taking the above example.. 1st Feb 2008, 10:00 a.m (in India) will be stored as 20080201043000.
    This time if seen in German Time zone will look as : 1st Feb 2008, 05:30 a.m.
    Simple right
    -> In India we store date as DD.MM.YYYY while in other countries they store it as MM.DD.YYYY.
    The separator could be . or - or / .
    The date format is user dependent. I might prefer to store it as DD.MM.YYYY and you might want to store it as MM-DD-YYYY.
    System does not bother what your format is. It always stores in YYYYMMDD (8 Char)
    On screens if you want to display Date then it must always be shown in that users format who is seeing it. How to get this done ?
    DATA : lv_date(10) type c.
    write sy-datum into lv_date.
    So in LV_DATE variable the date will be stores in the users format.
    Simple right
    There are function modules that do the same. But normally we should avoid use of FM to make code simpler, short and easy... no complications at all ..
    You can use system variables sy-datlo (Local Date for Current User) and sy-timlo ( Local Time of Current User ).
    You can also use GET TIME statement.
    reward if useful,
    preet

  • How to get system time format in time stamp

    Hello All,
    I have one problem regarding Time stamp. I want system time stamp format in Time control. If my system date/time format change then automatically my time stamp format should also change.If my system Time stamp format is hh:mm:ss AM/PM dd/mm/yy so in my LabVIEW time stamp format should also same. If System time stamp format hh:mm:ss AM/PM mm/dd/yyyy so in my LabVIEW time stamp format should also same.
    So Please help me its a very important for my automation application.
    Thank You.
    Vinal Gandhi
    Kudos are always Welcome.... :-)
    Vinal Gandhi, CLD
    Software Engineer

    Hi Vinal,
    have you tried the FormatDateTimeString function with a standard string indicator and the "%c" formatcode as described in the help instead of the generic timestamp indicator?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Converting UTC time stamp to local time (CET)

    Is there a smooth way to convert a time stamp from UTC time into the local time (e.g. CET)?
    CONVERT TIME STAMP.... Just converts the timestamp from local time zone to UTC, is there another comand to perform the opposite conversion?
    TIA!
    /Armin

    Hi Armin
    The statement does not only convert from local time zone to UTC you can specifiy any timezone:
    CONVERT TIME STAMP time_stamp TIME ZONE tz
            INTO [DATE dat] [TIME tim]
            [DAYLIGHT SAVING TIME dst].
    The following statement can also be used to convert from date time to timestamp.
    CONVERT DATE dat [TIME tim [DAYLIGHT SAVING TIME dst]]
            INTO TIME STAMP time_stamp TIME ZONE tz.
    Regards
    Faaiez

  • Set system time in both unix and NT

    i need to write a software to be run on the 2 platforms to set the system time if anyone know how to go about doing it please guide me along and provide me some code.
    thanks in advance

    You cannot set the system time using pure Java, so I guess you'll have to use JNI or Runtime.exec().
    If you use JNI, you'll have to set up a native method and the build a different DLL for each platform. From my point of view this is the cleanest way.
    Using exec() requieres to detect the system your program is running on, and then call the appropiate external program or command.

  • BPM: How to capture Webservice system Time

    Dear friends,
    I  have one Sybchrounous Interface as follows :
    Local PI folder -
    >PI -
    > Webservice system
                                 ( Sync Interface )
    Overall flow:
    1.        PI Picks up the Control file consisting of date& time, count and start fields from PI folder.
    2.        PI mapping converts the file to soap request message and sends it to Web Service
    3.        PI receives the response soap message from web service converts into an XML file and places in the PI folder.
    4.        The loop continues in PI BPM until all the records of particular time period are retrieved.
    Logic in Detail:
    5.     The initial request file consists of a user defined time stamp (since), count and start values to retrieve the initial load.
    6.     PI BPM sends this request in a synchronous mode to Web service and gets the response back.
    7.     Apart from the device details, the response message from WS consists of u2018current_timeu2019 field which is the current  system  time of webservice when the query is executed on the web service System.
    8.     BPM has to capture this field during first iteration and updates the source request message field u2018sinceu2019 with the web      service system time.
    9.      From next cycle, PI picks up the file which consists of WB service system time in the u2018sinceu2019 field.
    10   BPM continues in loop until all the records are fetched from web service and writes the files with time stamp concatenated to the PI folder.
    Bottlenecks:
    Tried to implement with BPM ..But facing problems to implement point 4 ,8 and 10 .
    Kindly guide  me how we can design this interface .
    Renu.

    Dear friends,
    I  have one Sybchrounous Interface as follows :
    Local PI folder -
    >PI -
    > Webservice system
                                 ( Sync Interface )
    Overall flow:
    1.        PI Picks up the Control file consisting of date& time, count and start fields from PI folder.
    2.        PI mapping converts the file to soap request message and sends it to Web Service
    3.        PI receives the response soap message from web service converts into an XML file and places in the PI folder.
    4.        The loop continues in PI BPM until all the records of particular time period are retrieved.
    Logic in Detail:
    5.     The initial request file consists of a user defined time stamp (since), count and start values to retrieve the initial load.
    6.     PI BPM sends this request in a synchronous mode to Web service and gets the response back.
    7.     Apart from the device details, the response message from WS consists of u2018current_timeu2019 field which is the current  system  time of webservice when the query is executed on the web service System.
    8.     BPM has to capture this field during first iteration and updates the source request message field u2018sinceu2019 with the web      service system time.
    9.      From next cycle, PI picks up the file which consists of WB service system time in the u2018sinceu2019 field.
    10   BPM continues in loop until all the records are fetched from web service and writes the files with time stamp concatenated to the PI folder.
    Bottlenecks:
    Tried to implement with BPM ..But facing problems to implement point 4 ,8 and 10 .
    Kindly guide  me how we can design this interface .
    Renu.

  • Comparing incoming file name having timestamp with system time.

    Hi,
    The scenario is File to FIle.
    i have to read the incoming file name which will be having time stamp.
    compare the time stamp with the system time .
    if the difference in time is within specified time then send the file to target location,else send a mail that file is not placed in target location.
    please enlight me on how this scenario can be done.
    Thanks,
    Akkasali.

    if you mean the actual time stamp on the file and not the file name then ref: http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417300)ID2044216150DB12410233167314983393End?blog=/pub/wlg/15154
    else if you mean the time stamp on the file name itself then use dynamic configuration and then read the file name and do the further processing - /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

  • Set system time to myrio programmatically synchrinized with GPS

    Hello,
    I have succesfully connected the PMOD GPS to my RIO and i extract the time and date string from the NMEA sentence in the following format:
    Time: HH:MMS
    Date: DD/MM/YY
    I would like to synchronize myrio system time to the GPS time. I have tried to use the nisyscfglvlib: Set Time.vi. For test purposes i try to set the time using a time stamp constant like the attached picture. However, when i run this code i get the following error. Where i can find this library and how do i add it to myrio? I
    LabVIEW:  Failed to load shared library nisyscfg.*:nisyscfg_lv_sysapiPropertySetString:C    . Ensure that the library is present on the RT target. Use either MAX to install NI software or FTP to transfer custom libraries to the RT target.
    LabVIEW:  Failed to load shared library nisyscfg.*:nisyscfg_lv_rmcfgPropertyGetItem:C    . Ensure that the library is present on the RT target. Use either MAX to install NI software or FTP to transfer custom libraries to the RT target.
    Is there another way to set the time of myrio programmatically?
    Thank you,
    Christos
    Attachments:
    set system time.JPG ‏14 KB

    Hi ckyamaha, 
    Below is an example on how to set a real time system's time using the System Configuration API.  
    https://decibel.ni.com/content/docs/DOC-20082
    It sounds like you may need to include the library on your myRIO when you configure it in NI-MAX.  If you haven't already installed the System Configuration API, you can do so from this link: https://decibel.ni.com/content/docs/DOC-13216
    You can add the library to your myRIO in the Add/Remove Software menu in NI-MAX.  Instructions for installing software using NI-MAX can be found here: http://zone.ni.com/reference/en-XX/help/373925A-01/myriohelp/myrio_advanced_config/
    Regards,
    Kelly B.
    Applications Engineering
    National Instruments

  • UWC + time zone + system time zone

    Hello,
    I have messaging server 7 running on solaris 10 x86.
    when I change my system time zone, the time stamp related to messages received and sent is getting changed, regardless of the time zone set in UWC (global setting).
    Is it a correct behaviour or it should have considered the time zone set in the UWC?
    Printable view of message in UWC, doesn't show the attachment information in that. is it a product limitation? or there is some configuration for that also.
    I have tried on 3 different servers.
    Thanks,
    Sumant
    Edited by: mr.chhunchha on Nov 21, 2008 2:02 PM

    mr.chhunchha wrote:
    I have messaging server 7 running on solaris 10 x86.
    when I change my system time zone, the time stamp related to messages received and sent is getting changed, regardless of the time zone set in UWC (global setting).Which "system" are you referring to, i.e. the client system running the browser or the server system hosting Messaging Server?
    Printable view of message in UWC, doesn't show the attachment information in that. is it a product limitation?Yes. There is an existing RFE to have this functionality added.
    Regards,
    Shane.l

  • Timestamp incorrect system time

    Hello, Guys,
    Quick question about system time and timestamp inconsistency.
    I used the following program to generate analog output (with duty cycle) but as i am outputting, it give me the time of 12/31/1903 at 16:00.
    I checked and reset the system time and it made no difference.  please advise,
    thank you.
    ck
    Message Edited by uclabme on 04-17-2006 05:18 PM
    Attachments:
    Square_analog_output_voltage.vi ‏91 KB
    abc.txt ‏32 KB

    Hello,
    The square waveform generator VI that is producing the waveform doesn't use system time as its basis, and that appears to be where the issue lies.  By default, the output waveform will be aligned to a t0 (initial time) of 0, since the waveform time stamp in this case is relative to the start of the program.  To align the time with the current system time, all you need to do is use the Align Waveform Timestamps VI to shift the t0 value of the generated waveform to match the current time.  I've attached an example (aligntimes.vi)  built in LabVIEW 7.1.1 that demonstrates - you should be able to adapt it very easily to fit your needs. 
    Cheers,
    Matt Pollock
    National Instruments
    Attachments:
    aligntimes.vi ‏44 KB

  • How can i get the System Time from the other host

    I want to get the System Time from the other host in the LAN,How can I get the Time using Java.
    Such as I am in WIN 2000 and I have a Unix host in LAN, I want to get unix host System time, How can I do it.

    Open a socket to port 13 and read a string with the time.
    -or-
    Open a socket to port 27 and read 4 bytes that are a network order timestamp
    Assuming that your UNIX machine has those services running, most do

  • Convert date time local Timezone  to GMT

    I need to get GMT time...
    How to convert local time to GMT ?
         public static long getGMTNow()
             Calendar local = new GregorianCalendar();
             local.set(Calendar.HOUR_OF_DAY, 0);              
             local.set(Calendar.MINUTE, 0);
             local.set(Calendar.SECOND, 0);
             System.out.println(local.getTime());
             System.out.println(local.getTimeInMillis());
             Calendar gmtC = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
             gmtC.setTimeInMillis(local.getTimeInMillis());
             System.out.println(gmtC.getTime());
             return gmtC.getTimeInMillis();
         }Result :
    Thu Feb 12 00:00:00 EST 2009
    1234414800034
    Thu Feb 12 00:00:00 EST 2009
    1234414800034

    Calendar gpsTime = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
             gpsTime.set(Calendar.HOUR_OF_DAY, 10);              
             gpsTime.set(Calendar.MINUTE, 0);
             gpsTime.set(Calendar.SECOND, 0);
             System.out.println("gpsTime: "+gpsTime.getTime());
             Calendar realtime= new GregorianCalendar();
             realtime.set(Calendar.HOUR_OF_DAY, 5);              
             realtime.set(Calendar.MINUTE, 0);
             realtime.set(Calendar.SECOND, 0);
             System.out.println("realtime: "+realtime.getTime());
             System.out.println("COMPARETO : "+ realtime.compareTo(gpsTime));
             long timediff = realtime.getTimeInMillis() - gpsTime.getTimeInMillis();
             System.out.println(timediff/1000 + " sec");RESULT :
    gpsTime: Mon Feb 16 05:00:00 EST 2009
    realtime: Mon Feb 16 05:00:00 EST 2009
    COMPARETO : 1
    0 secOk, I done my homework. getTime() will allways return local time so I need to set the GPS time to a GMT Calendar to get the right result.
    Funny thing, look at the compareTo result....

  • Convert date/time to GMT format

    Hi,
    I want to convert my current system date to GMT format. the class java.util.Time/Calender have methods which help u to convert from GMT to local time.
    is there a method to convert from current System Date to GMT.
    tx in advance

    i found the answer to my earlier question from the postings. Now i need help with the format og the Date in GMT.
    i used the following code to get the GMT based on the system time
    Calendar here = Calendar.getInstance();
    int gmtoffset = here.get(Calendar.DST_OFFSET)
    + here.get(Calendar.ZONE_OFFSET);
    //to convert to GMT time
    Date GMTDate = new Date(System.currentTimeMillis() - gmtoffset);
    the result of exceuting the following code is
    GMT Date is Mon Aug 20 18:39:19 EDT 2001
    but i need the GMT time in this format
    20010820-18:39:40
    tx
    Namrata

  • How to compare the current system time with two timing?

    want to get the current system time and compare with the two different timing example startwindow time as 2:00:00AM and endWindowTime as 6:00:00AM. if my current system time falls between these window i have to execute my rest of the code.
    my below code works for fine for JAVA 1.6 version when i do the same code with JAVA 1.4 i am getting different date and time
    String starTime=(String) NightlyvendorStatus[0].getPropertyValue("startTime");
      String endTime=(String) NightlyvendorStatus[0].getPropertyValue("endTime");
      Date windowStarttime = new SimpleDateFormat("HH:mm:ss").parse(starTime);
      Date windowEndtime = new SimpleDateFormat("HH:mm:ss").parse(endTime);
      Date systemdate = new Date();
      SimpleDateFormat parser = new SimpleDateFormat("HH:mm:ss");
      String systemTime=parser.format(systemdate);
      Date currentTime = new SimpleDateFormat("HH:mm:ss").parse(systemTime);
      if (currentTime.after(windowStarttime) && currentTime.before(windowEndtime)){
    --- rest logic here---}
    the output from JAVA 1.4 IS Thu Jan 01 02:00:00 GMT 1970 Thu Jan 01 06:00:00 GMT 1970 Thu Jan 01 03:23:00 GMT 1970
    HOW TO DO this logic..

    Hi,
    You can try converting dates into timestamp and compare just like as comparing two integers variables.
    Regards,
    Anshul

Maybe you are looking for