Time Stamp Conversion

Hi,
      I need to convert the following time stamp into date and time. could any one help me how to do this?
Input format:
2008-05-19T01:00:00Z
Convert statement wont work as it has characters in it.
At present i have converted by using split statment. is there any other way of doing it ?
Regards,
Niyaz

Hi,
As in above post u use the FM to get your output. Check the below code:
data : a type string,
       time_stamp type TZONREF-TSTAMPS,
       date type SY-DATLO,
       time type SY-TIMLO.
a = '2008-05-19T01:00:00Z'.
REPLACE ALL occurrences of '-' in a with space.
REPLACE ALL occurrences of ':' in a with space.
REPLACE ALL occurrences of 'T' in a with space.
REPLACE ALL occurrences of 'Z' in a with space.
time_stamp = a.
CALL FUNCTION 'ABI_TIMESTAMP_CONVERT_FROM'
  EXPORTING
    iv_timestamp           = time_stamp
IMPORTING
   O_DATE                 = date
   O_TIME                 = time
EXCEPTIONS
   CONVERSION_ERROR       = 1
   OTHERS                 = 2
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 : date, time.
Regards,
Raghu

Similar Messages

  • Problem with time stamp conversion

    Hi All,
    I am using the below code to convert timestamp to date and time  , its working fine when i print it with write statement  .
    But i want to convert and pass the time and date with format to excel sheet , but  its it taking again as string not in date time format .
    please see the below code .
    time_stamp = 20030309043000.
    CONVERT TIME STAMP time_stamp TIME ZONE tz
           INTO DATE dat TIME tim. 
    *WRITE: /(10) dat, (8) tim .
    please suggest .

    Now that you've converted your time stamp to date (type d) and time (type t), convert them into alphnumeric fields like you want or tell excel what is in that column, since Excel isn't telepathic...and doesn't always know what we sent it....
    data: date10(10) type c.
             time8(8) type c.
    write dat to date10 mm/dd/yyyy. "converts type d to user's specific date setting (not necessarily mm/dd/yyyy).
    concatenate tim(2)
                        tim+2(2)
                        tim+4(2)
       into time8 separated by ':'.
    I do wish that I understood the fascination with Excel....when we have such marvelous tools to work with inside SAP or BW.

  • Time stamp conversion and graphs from array data

    How can you read time stamps and data currently in an text file as an array and split in for display on a graph. I think I need to convert the time stamp back into seconds to do this but not sure how to do so?

    If you're using 8.2, the Read From Spreadsheet File VI can read string files. If not, you will need to open the VI and read the instruction on the diagram for how to change it.
    Once you have your string array, you can use the VI found here to convert the time column (note - read the thread) and convert the second column using the String to Number functions.
    Try to take over the world!

  • FLOAT TO TIME STAMP CONVERSION

    Hi Folks,
    I am getting some pain while i am converting from float values into timestamp...
    I have a T1 table and one columns data type as float ...i want convert that float values into time stamp..
    Exp: field1(float datatype)
    48045.4352222
    45065.4452222
    These above values need to convert to time stamp (DD-MM-YYYY HH24:MI:SS)...

    sb92075 wrote:
    microfortnights? (do the math!)
    Anybody know where microfortnight originated?I once consulted in a British railway firm - they still used "chains" as a form of measurement.
    http://en.wikipedia.org/wiki/Chain_unit
    I thought I'd dropped back into the Middle Ages - and it wasn't the only way.
    A HUGE* system.
    The only thing any table had (apart from data) was a primary key. No DRI. No nothing. I ran
    a query to look for foreign keys (way to start to understand the system) and got no results returned.
    I thought the mistake was mine, but no - the developers proudly* said that the system only
    had PK's and nothing else. I actually got into an argument with a semi-colleague/programmer who
    thought that it was up to programmers to control referential integrity - I could only shake my head.
    There was an issue with a CASCADE DELETE (it wasn't happening) - I advocated putting it in
    the database, but was overruled because the system had to work with several RDBMS's.
    Ah, well - Oracle Insights deja vu all over again!
    Paul...

  • Date Time stamp conversion

    I have a timestamp coming from flat file in the following format YYYY-MM-DD HH:MM:SS.mss(2007-02-21 11:48:31.000)
    to store in Bw I have  created a Object as data type :NUMC and length 14 ,I have conversion routine as times .I was wondering if this will work and also
    can anyone suggest me to covert this as YYYYMMDD and tIme by spliting the field i am getting from flat file.
    Thanks
    Samuel

    Hi Samuel,
    You would need to write a routine for converting.
    Char v_date(8), i_date(18), day(2), month(2), year(2).
    i_date = trans_stru-<your date>.
    day = i_date +  9(2).
    month = i_date + 6(2).
    year = i_date + 5(4).
    concatenate year month day into v_date.
    Result = v_date.
    Bye
    Dinesh
    (Do not forget to assign points!!)

  • Function module required for time stamp conversion into MST

    Hello,
    Please let me know if there is a SAP function module that can convert timestamp from GMT or provided timestamp into MST. I will need to use this function in BW transformation.
    Thanks.

    Try this one: TZ_GLOBAL_TO_LOCAL.
    Haven't used it myself yet, but it looks good.
    Good luck!
    Best regards,
    Zhou

  • Time Stamp Conversion program usage

    Hi ,
               Could you plz give solution for where we can use TIMESTAMP program in SAP R/3 an in SAP BW?
    Thanks
    Surya.

    Hi Surya,
    Please refer the below link which should help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/60/b03f3ba54511d2a97100a0c9449261/frameset.htm
    Regards,
    Sharath

  • Time stamp to number conversion

    Hi All,
    I notice in Labview 7.0 the 'Get Date/Time to Seconds' and 'Seconds to Date/Time' now output a Time Stamp rather than actual seconds.
    There is a 'To Time Stamp" standard vi in the conversion pallet that converts a number (seconds) to a time stamp but I really need to convert from a Time Stamp to real seconds.
    Does anyone have a vi that might do this or is there something already in LabVIEW 7.0 I have overlooked?
    Many Thanks in Advance for your help.
    Sammy Mason

    You are going to have to post an example where the conversion does not work.
    Message Edited by Dennis Knutson on 05-05-2007 05:34 AM
    Attachments:
    TimeStamp to Dbl.PNG ‏2 KB

  • Time stamp in text conversation? Long convo not updating with time stamp!!

    I need my time stamp on each text! Three hours pasted and no time stamp update in text convo!!'???
    <Edited by Host>

    Hi, Acmarie.
    Thank you for visiting Apple Support Communities. 
    To see what time a message was sent or received. Drag any bubble to the left.  Below, I have included the user guide which references this new feature on page 66. 
    iPhone User Guide
    Cheers,
    Jason H. 

  • Bug report: Time stamp misalignment in recent list

    Bug report: With the new compact design, go to recent pivot, tap on a conversation, press back button to go back to recent, notice the time stamps to the right of the list have moved even more right, with text being cut off the screen.
    Using Lumia 1020 with Cyan and 8.1.1 DP.

    I figured this would be the best place to post it so that an Apple representative might see it.
    Actually it's not as likely to be seen here since there are so many posts for any Apple rep to have to scan. The best way to report an issue to Apple is through the feedback pages or, if you're a member of Apple's developer program, through the bug reporter.
    Regards.

  • GMT time stamps interfere with calendar in 8.1.2

    How do I prevent GMT time stamps from interfering with my calendars? This did not occur until I upgraded to OS 8.1.2
    I sync an iPod touch 5th generation with google calendars, and have done so with this device for over a year, and on a generation 3 device for four years - all without hassle. 
    Since upgrading to 8.1.2 my calendar is suddenly very difficult to use.
    -Chris

    Sushil,
    Please post this question in the Workshop 8.1 beta newsgroup.
    weblogic.developer.interest.81beta.workshop
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.81beta.workshop&utag=
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Sushil" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hi All,
    I am trying to develop JSP client for a conversational webservice. I amtrying
    it in two ways and
    none of them is working.
    1)
    I have put the Java Proxy file generated by Weblogic Workshop for myWebservice
    in the lib
    directory of the web application. According to article posted in "DearJohn" series,
    my proxy
    must have methods that take one additional argument to pass in Header infoapart
    from all
    the arguments mentioned by me. But, I don't see any methods like this inmy proxy
    and
    corresponding stub.
    2)
    Other suggested method is to use Webservices Control. In this, I amsetting a
    string as
    Conversation ID when I invoke a method that is marked to startconversation. Further,
    if I
    invoke any other method marked Continue in the same JSP it works. But,from another
    JSP
    where I set the same conversation ID and then try to call a method markedas Continue,
    it does not work. It say, check whether you have start a conversation. Ican see
    my conversation
    in Test browser and I am calling continue method before max-idle-time.
    I am not sure which step I am missing. Help Required!!!
    Thanks in advance,
    Sushil

  • Help to read a table with data source and convert time stamp

    Hi Gurus,
      I have a req and need to write a ABAP prog. As soon as i excute ABAP program it should ask me enter a data source name, then my ABAP prog has excute teh code, in ABAP code i have to read a table with this data source as key, sort time stamp from table and should display the data source and time stamp as output.
    As follows:
    Enter Data Source Name: 
    Then user enters : 2lis_11_vahdr
    Then out put should be "Data source  :"  10-15-2008.
    The time stamp format in table is 20,050,126,031,520 (YYYYMMDDhhmmss). I have to display as 05-26-2005. Any help would be apprciated.
    Thanks,
    Ram

    Hi Jayanthi Babu Peruri,
    I tried to extract YEAR, MONTH, DAY separately and using
    EDIT MASK written it.
    Definitely there will be some STANDARD CONVERSION ROUTINE will be there. But no idea about it.
    DATA : V_TS      TYPE TIMESTAMP,
           V_TS_T    TYPE CHAR16,
           V_YYYY    TYPE CHAR04,
           V_MM      TYPE CHAR02,
           V_DD      TYPE CHAR02.
    START-OF-SELECTION.
      GET TIME STAMP FIELD V_TS.
      V_TS_T = V_TS.
      CONDENSE V_TS_T.
      V_YYYY = V_TS_T.
      V_MM   = V_TS_T+4(2).
      V_DD   = V_TS_T+6(2).
      V_TS_T(2) = V_MM.
      V_TS_T+2(2) = V_DD.
      V_TS_T+4(4) = V_YYYY.
      SKIP 10.
      WRITE : /10 V_TS," USING EDIT MASK '____-__-________'.
              /10 V_YYYY,
              /10 V_MM,
              /10 V_DD,
              /10 V_TS_T USING EDIT MASK '__-__-__________'.
    If you want DATE alone, just declare the length of V_TS_T as 10.
    Regards,
    R.Nagarajan.
    We can -

  • Time Stamp format from file problem

    Hey there,
    I have a pretty peculiar problem. I'm working on two PCs right now, one is my private laptop running on Windows 8, and the other one the PC at my workplace, running on Windows XP, but on the same version of LabVIEW. I use this method to save the time and date to a tab delimited .txt file. Then later, with another VI, I read the date and time written to file to reconstruct the time stamp. I've noticed that dates written to file from my workplace differ from the dates written from my private PC: in Windows XP, there are "-" separating the day, month and year. In Windows 8, it's "/". There are other differences (see pictures). So naturally, when reading from file using my VI, I can only read on my private PC files (or at least dates) written on my private PC and vice versa, I can't read files written on my private PC on my workplace PC. Can anybody tell me why there's a difference in format, or how to write the date uniformly so I can read it on any PC, or how to read both formats?
    So this is the method I use for writing the time and date (the subVI only inserts a certain number of TAB characters).
    This is what it looks like on Windows 8
    This is what it looks like on Windows XP
    This is the VI (attached) I use to read the time stamps (the first row actually contains the time stamp in HH:MM: SS format for a whole bunch of measurements).
    Have a nice day.
    Solved!
    Go to Solution.
    Attachments:
    Extract Time Stamps.vi ‏22 KB

    I would suggest using the ISO-8601 UTC format.
    The only limitation is that the string value is in reference to GMT.
    The conversion of the string back to a timestamp will present the date/time on your front panel indicator as local time.
    https://lavag.org/topic/15034-timestamp-support-for-format-into-string-scan-variant-from-string-stri...
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Time stamps in Bridge CS4

    I am using the image processor feature in Bridge CS4 to convert a bunch of RAW files into JPGs. The problem is that when you do this you loose all the time stamps of when you shot the photo, or at least the [date created] or [date modified] in the folder view is the date of the conversion.
    I would like to know if there is anyway to keep the actual date you shot the image so when you do a search in windows you can go by date.
    Anyone?

    krmswl wrote:
    or at least the [date created] or [date modified] in the folder view is the date of the conversion.
    These 2 date stamps above are not the same thing.  Make sure in metadata you have both options checked to display.  The date created is set by the camera, and some have tried to figure out how to change it and found it was not possible with Bridge.  Of  course the date modified changes whenever file is modified.

  • Time stamp to name a TDMS file

    Hi:
    I am using data from excel files to create a time stamp, after that,my VI creates TDMS files with this data in files with 5000 samples, also I am using time stamp to named the TDMS files, but my problem is that my first file takes the name 180000.000, How can I modify this? because I need my file´s name will be the first data from excel.
    I attached my VI and two excel files, the idea is that the first file will be 84327.500 and the second will be 84740.950
    Attachments:
    test1.xlsx ‏150 KB
    test2.xlsx ‏151 KB
    testfile.vi ‏56 KB

    First, let me congratulate you on taking your first steps to learning LabVIEW. If you have not already done it, I highly recommend you go through the online tutorials. You have an actual project to work on, so application of what you learn will be fairly immediate.
    For your actual program issue, you need to read the data from the Excel file and convert it to a timestamp before you set your filename. The order of operation of your program is to set the TDMS file name while simulataneously reading from the Excel file. After you have already created the TDMS file, you convert the data to a timestamp and write this to your timestamp front panel control. Note that the first point you write to the TDMS file may or may not be what you think it is. It could easily be the same 180000.000 value you are using to name the TDMS file. You have what is known as a race condition. The order of operation between the read and write of the timestamp control is not known and can be variable. It is one of the reasons that you should NEVER use local variables to pass data around. Use wires. In LabVIEW, wires are the data and take the place of variables in a text base language. Front panel controls should be used only for user interace reasons. In your loop, you should wire the timestamp from its current conversion (wired into the timestamp on the front panel) directly to the TDMS write (currently wired from a local variable of timestamp).
    A couple of other things. You do not need to convert your data arrays to matrices to index them. This can be done directly with Index Array from the array palette. This single primitive will replace the Array Subset, convert to matrix, and index matrix primitives.
    You do not need to go through a string conversion to produce a timestamp. The Date/Time to Seconds primitive in the timing palette will do it directly. You will need to populate the cluster input.
    When you posted your code, you did not include your subVIs. In the future, include all your VIs, either separately or in a ZIP file.
    Finally, to solve your intial problem, use Index Array to pull the first row of data from the Excel file, then convert this to a timestamp using Date/Time to Seconds. Use this to create your TDMS file.
    You may have noticed, if you do all this, you do not need your timestamp front panel control, other than as a simple monitor.
    Good luck! Welcome to LabVIEW.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

Maybe you are looking for

  • Adobe Bridge Batch Rename Stopped Working

    ive been using bridge exclusively to rename/ organize my files and today for some odd reason it just will not work. i select the files i wish to rename and then select batch rename and name/numer the files as ive always done before and when i click r

  • System Crashes repeatedly - hard drive issue?

    I've been using my G4 933MHz with 2 internal hard drives for quite some time. I started having issues with the system crashing, while the system drive made a binding or poer up/down sound repeatedly. The drives were stacked on top of one another, so

  • How to develop Web Services

    I have to develop an application suing Web Services. I'm not using ITS. I already read the HelpOnline and the attachemnet of note 547847 (it seems usefull only for Was 620) Do you know there is available some "how to do " document ? thanks in advance

  • Having a PDF document close immediately after priniting

    Hi guys, I need to know if it's possible to have a pdf document close immediately when print is selected..... In addition to this, is there something that can restrict the number of copies to 1. This is for a downloadable voucher and i don't want peo

  • Mail not moving messages or deleting from server until application quitted

    I have an Outlook.com email account. When I delete messages or move them in Apple Mail, the change is not reflected on the server until I quit the program completely. This isn't happening with other actions. Mail is immediately marked as read or flag