Question on date, time and time stamp related - high priority

Hi friends,
     My requirement is to find the processing time (time taken) of a task done by an agent in wf. For that I use Start Date, Start Time, End Date and End Time ( from struc SWP_LOGTAB ). I have to display the time taken by an agent in the form WWd XXh YYm (or WWd XXh YYm ZZs) ex: 2d 10h 40m 20s.
Can any one suggest me the right FMs which take start and end date/time and give me the above format result?
This can be achieved manually with unnecessary Ifs and CASEs but its gonna be a performance issue. Please suggest me something SAP standard.
Thanks in advace for your help
Reddy

Hi,
I don't find any function module, but it does'nt really hard to code this using DIV and MOD instructions :
If you've got your time in seconds :
w_day = w_time DIV 86400.
w_mod = w_time MOD 86400.
w_hour = w_mod DIV 3600.
w_mod = w_mod MOD 3600.
It doesn't seem too bad in term of performance....
Mathieu

Similar Messages

  • The export file from a calc script - naming and date/time stamp

    Here is a simple calc script to export data.
    2 questions:
    1. Is there an easy way to add a date/time stamp on the name of the data file so that it does not overwrite the older ones every time?
    2. I tried to specify the path so that it write to another server. "\\mfldappp011\E:\Exp_AW.txt". It's not working. How should I specify the path ?
    Fix (@Relative("Yeartotal",0),"Actual","Working",&ActualYear);
    Dataexport "file" "," "C:\Exp_AW.txt" "#MI";
    EndFix;
    Edited by: user9959627 on Sep 7, 2012 11:25 AM

    Probably easiest to call the maxl script from a command line script, then rename the exported file to include the tme stamp and copy/move it to a location.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Save the file and give date & time stamp

    1. Reading the Excel file from the selection screen as a parameter.
    2. Using F.M. ALSM_EXCEL_TO_INTERNAL_TABLE reading Excel file into
        Internal table.
    3. Implementing the Business Logic.
    4. Move output to Final Internal table.
    5. Final internal table should generate a Flat file. By using GUI_DOWNLOAD.
    6. That flat file should be saved with the name and location given in the Excel.
    7. When ever I run the program output file will generate in the same location but with date and time stamp. Because I’m running the program for range of employees say initially I run for 1 – 10,000 employees next 10,001- 20,000 like that.
    Whenever I run for 2nd time it will overwrite the previous output, that’s the reason I’m using date and time stamp.
    Eg:
    PERSONAL Numbers              Name                                         Location
    00000001                 xxxxx-24.04.2007-10.30          C:\        
    00000002                 xxxxx-24.04.2007-10.35
    00000003                 xxxxx-25.04.2007-10.40
    00000004                                  xxxxx-25.04.2007-10.30
    Can any one help me how to save the file and give date & time stamp through hardcode?
    please help me in this issue.

    I am not clear with your problem. Based on the understanding of your question,
    there  can be two cases.
    1- U want to insert time stamp in the output file.
    2- Time stamp is already there, u just have to solve the overwriting issue.
    If your question goes with option 2, You can make use of import parameters
    <b>CONFIRM_OVERWRITE</b> : Which will ask for confirmation before overwriting.
    <b>APPEND</b> : which you can choose either to append the data to the existing file or overwrite it.
    Please inform if the issue is not resolved.
    Message was edited by:
            BINU RAJ BINU

  • Video and photo date&time stamp (nokia 5800)

    Hi,
    i have the nokia 5800 and i'm having a strange problem.
    i had to format my memory card so i copied everything to my pc, and after i formated it i copied everything back to the memory card.
    now if i open an image and check to see the date it's showing me the date and time i copied the file back to the memory card instead of the date&time i took the image.
    same thing with the videos.
    i have the same photos in my pc and when i check the exif data i can see the date when i took the photo.
    i opened the videos with "media player classic" and i looked for the "media info", and i can see there when the video was made but it's in UTC time.
    how can i make the phone read the correct time when the images and videos were taken?
    Thanks for any help,
    Erez.

    Sach1n wrote:I want to put Date & Time Stamp on photos clicked via Nokia 5800XM. Is it possible?
    Hi Sach1n
    Unfortunately that is not feasible but you can view the EXIF Data on the 5800XM with a python application as per screenshot here:http://i35.tinypic.com/ht9ovs.jpg
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Extract date/time stamp and modifier name from memo field

    I need to extract all date/time stamps and modifier name strings from the Work Log memo field - or conversely, filter out all of the comments after the date/time modifier strings.    I have the string extract but it only extracts the first one.  I need to loop until all are found - how can I do this?  The memo field will look something like this:
    3/5/2009 3:32:05 PM John Doe
    Comments - string can be any length
    3/4/2009 12:35:43 PM John Doe
    Comments - string can be any length
    3/4/2009 12:28:17 PM Jane Dough
    Comments - string can be any length and include date format 2009-06-04 14:20 CST.
    3/4/2009 12:27:47 PM Mary HadaliddleLam
    Comments - string can be any length
    3/4/2009 12:26:55 PM Lamseedivy
    Comments - string can be any length
    3/4/2009 12:15:22 PM Mareseedoes
    Comments - string can be any length.

    Here is a formula that will strip all 'comment' and blank lines and puts the datetime stamp and user names into an array.  You have to manipulate the elements of the array to further separate the datetime stamp and user name if required.
    // Declare two indices
    numbervar i := 1;
    numbervar j := 1;
    // Split each row of the memo field into an array
    // if chr(10) does not work then try with chrw(13) or chr(13)
    stringvar array x := split({Sheet1_.Comments},chr(10));
    // Declare a holding array
    stringvar array y;
    // Declare the size of the new array to be equal to the elements in array 1
    redim y[ubound(x)];
    // Copy only if the first word of each element of array 1 is neither "comments" nor a blank line
    for i := 1 to ubound(x) do
    if split(x<i>) = 'comments' or x<i> = '' then
    else
    (y[j] := x<i>;
    j := j + 1;
    // Compress the new array to eliminate the last blank element
    redim preserve y[j-1];
    // Joining the elements of the new array and the number of elements for display
    join(y,chrw(13)) & chrw(13) & ubound(y);
    With your example, this formula will return:
    3/5/2009 3:32:05 PM John Doe
    3/4/2009 12:35:43 PM John Doe
    3/4/2009 12:28:17 PM Jane Dough
    3/4/2009 12:27:47 PM Mary HadaliddleLam
    3/4/2009 12:26:55 PM Lamseedivy
    3/4/2009 12:15:22 PM Mareseedoes
    6.00
    Make sure the "can grow" option is checked to display the results and also check for case sensitivity of "comments".
    Edited by: Sanjay Kodidine on Jun 30, 2009 10:13 AM

  • HT2513 Is there a way to see who made an appointment and at what time/on what date they made it? Kind of like a date/time stamp for our network calendar?

    Is there a way to see who made an appointment and what time/on what date they made it? Kind of like a date/time stamp for our network version of iCal? Everyone has all rights and privledges to everyone else's calendar, and sometimes we need to know who did what to whose.

    Christine,
    You can also ask in the Typography forum,
    http://forums.adobe.com/community/design_development/typography?view=discussions&start=0
    The guy running whatfontis is a regular poster there.
    And apart from
    http://www.whatfontis.com/
    there are
    http://www.identifont.com/
    http://new.myfonts.com/WhatTheFont/
    and especially for script,
    http://www.bowfinprintworks.com/ScriptIDGuide.html

  • Adding date/time stamp to images

    Hi all, we are working with multiples video sources with JMF. Now we need to add on each stream a date/time stamp and a name of the source camera.
    Does someone knows how we can do it without manipulate each frame on each source ?
    Thanks in advance and best regards.
    Edoardo

      Try the Premier Elements forum for video questions. You will get better advice over there. Good luck.
    http://forums.adobe.com/community/premiere_elements

  • Auto Date/Time stamp required for Numbers 3.1

    I would like to automatically add a Date/Time stamp to the last column's cell, when a person's name is selected from the pop-up menu in Column C.
    As a number of different people will be using the spreadsheet, I'd prefer not to have a keyboard short cut, as it can be easily overlooked.
    I was wondering if it were possible to use a script to copy a cell's (column D) results, containing the 'NOW()' or 'TODAY()' function, and paste the results into the 2nd cell (Column E), allowing the last column's formula to reference the 2nd cell?
    The formula in the last cell   =if($C2="","",$E2)  can then reference a static cell, rather than a live cell.
    I know enough to be dangerous, so I'm not sure if i'm heading in the right direction.
    Thanking you all in advance.

    Hi Gordon,
    Is this the same as a script?
    Good question! It's fun to see people try to define what a service is. It may be one of the least understood and appreciated features on the Mac. It was certainly a mystery to me not long ago.
    I think of a service as anything that can be made to appear in the Services menu. Apple has made that easy with Automator. You fire up Automator, create a new service "workflow" document, plop in a script, save, and see the result immediately in the Services menu. You can also send the .workflow package to someone else, who only needs to double-click to install it.
    This particular date-time service contains a short AppleScript (you can view it by opening the .workflow in Automator.  But other languages (Python, Perl, etc) and Unix utilities can be used too, as illustrated here.
    Since Numbers has decent support for AppleScript, it is quite easy for the non-technical user to "bolt on" menu choices to do quite sophisticated things that are not built into the interface itself.  I find it more accessible than (and just as powerful as) the VBA used for Excel macros. But that could be mostly a matter of familiarity.  In any case, it adds a whole new dimension to Numbers.
    SG

  • Error messages when sending date-time stamp to Oracle Database

      I have a complex application that communicates with an Oracle database.  One of the table values that gets written to the table is a date-time stamp.  Until recently, the user only required a date, and this was never an error. (The format String used was %d-%b-%Y)  Now they need a time-stamp as well, so I attempted to edit the format string input of the format date/time string function to include the time. I have tried numerous format strings, each of which returns an error on execution.  Depending on which format I use, I get one of 3 different error messages.  The really odd thing is that both the date and time always get stored in Oracle without any problem (regardless of what date-time I use, as long as I include the date and any part of a time stamp - I get the entire timestamp even if I only include %I for the hour).  The only issue is that LabVIEW generates an ODBC error if I try to include the time to the date-time stamp.  In other words, teh date/time stamp writes to the Oracle database, but an ODBC error occurs every time.  I've included a word doc with screen captures of the format strings used, the resultant date/time stamps written to Oracle and the error messages generated within LabVIEW. Any advice would be most appreciated.
    Attachments:
    Summary of ODBC Error messages related to date-time stamp.doc ‏65 KB

    Oracle has a standard date format: 12-Mar-2009 that it accepts as a string, but if you want more than that, you need to use the todate() function. I used this string going into the standard LabVIEW ''Format date/time sting vi' 
    to_date('%d-%b-%Y %H:%M:%S', 'DD-MON-YYYY HH24:MIS') to create the value needed for Oracle.
    Then I use standard format string to create SQL: insert into mytable (mydate) values(%s) and select * from my table where mydate = %s using the string above for %s.
    I think you can also define a global format for all time strings but I haven't bothered figuring that out.

  • Formatted Search - Date Time Stamps

    Hi,
    We are trying to use a Date & Time Stamp for two udf's of which I will then calculate the difference in a report. I have a couple of issues. Ideally the user would enter the Start field (udf1), click Shift-F2 and that udf would be populated with a Date/Time Stamp like: 07/12/09 14:30:00 or 07/12/09 02:30PM. The user would also do the same thing for the End field (udf), so I end up with two udf's that both hold a Date/Time Stamp described above.
    1 - It looks like I will either need two udf's each for both stamps, one for the Date (date field type) and one for the Time (hour field type)...or I will need to use an alphanumeric field type to hold the whole timestamp. When using the hour field type I still have some issues.
         and
    2 - I can't seem to get the right sql (sbo query) function to return the date/time stamp and / or I can't cast it or format it the way I would like.
    -If the udf is date field, I can use the GetDate function, but it doesn't seem to get the time with it or the field isn't big enough or formatted properly.
    -If the udf is an alphanumeric field, I cast the GetDate function as nvarchar and it returns the date/time stamp, but it is an alpha field and the date is Jul 21 2009  4:41PM. I don't like the Jul 21 2009 formatting
    -If I use two fields, one for date (date type) and one for time (hours type), the date is formatted the way I like, but the hours field doesn't display the AM or PM and my formatted search doesn't return military time (14:00 instead of 2:00PM), so I can't tell if 2:00 is morning or afternoon.
    So I guess my questions are pretty general...Am I using the correct field types? Any suggestions on what to use? Are there any other ways to format this data? Not all date functions or casts (time, smalldatetime) work in the sbo query so I am looking for options. Any suggestions on what functions or cast to use?
    Thanks

    Hi,
    As you already aware, within B1 you may not treat datetime field easily.  For one of your request: I don't like the Jul 21 2009 formatting.  You could use function such as
    Select CONVERT(nvarchar(30), GETDATE(),106)
    to change it to 21 Jul 2009.
    Thanks,
    Gordon

  • How do I to get the date/time stamp back on my texts in ioS7?

    I've looked and looked to find an option and I can't seem to locate one.  Does anyone know how to put the date/time stamp back...?  It does appear in, but not consistently.

    Swipe right to left and they will appear as you need them.

  • How do you vary the Date/Time stamp format in File Adapters

    In the receiver channel of the File Adapter where you specify the 'File Name Scheme', you do have the option of specifying a 'File Construction Mode' of 'Add Time Stamp'.  How can you specify a different Date/Time stamp format ( eg MM/DD/YY vs YYYYMMDD vs MMDDYY, etc. ) without changing the Date/Time stamp for the entire SAP system?  Also, can you control where the Date/Time stamp appears in the filename?

    Hi,
    There are many threads discussing the same issue. Go thro the following:
    Dynamic file name (Date) in Receiver File Adapter
    Receiver File Adapter - TimeStamp
    Bhavesh's reply in above thread:
    You can use Adapter Specific Identifiers and then change the file name in the mapping. Append the tiem stamp in the format that you want and so on.
    Just use this code in an UDF,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String SourceFileName = conf.get(key);
    java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
    dateformat.format( new java.util.Date() );
    String newfilename=SourceFileName+dateformat;
    // change to new file name
    conf.put(key, newfilename);
    return "";
    Regards,
    P.Venkat

  • Need to add date/time stamp to file name without time change creating new files

    We have setup our application to save data once a trigger event occurs. We also need the date/time stamp as part of the file name. We used Format Date/Time String and concatenated it into the file name. It all works good, but as the time changes (seconds, minutes, etc.) it causes the Write to File to create a new file with the new filename. Is there a way to create the file and save/latch/buffer the time in the file name so that it doesn't create a new file for every second?
    I've attached a shot of the relevant part of our VI. It's all in a big while loop. The data save is in a case/switch so that when it is triggered it starts saving. (The for loop is to split the data up
    into 4 different files). Like I said, it all works except new files are created every second as the time changes instead of just putting it all in one file with the initial time in the file name.
    Attachments:
    TimeInFileNameQuestion.jpg ‏46 KB

    I need a loop in order to use a shift register. I cannot stop the outer while loop (because it would stop the hardware from collecting data), and I cannot add loops inside which bogs down the processor to where the app stops. I've attached a simpler version of my VI which illustrates the problem. While the button is pressed (the trigger) it should save the data (in this case just cycle numbers) into one file with the initial date/time. But, you can see that it creates 1 file/second. I tried using shift registers, but without adding extra loops I can't see how to do it. Thanks
    Attachments:
    FileNameTest.vi ‏29 KB

  • Date-Time stamp on CQ published pages

    Hello,
    How do I display last-published-date-time stamp for published CQ pages. This is critical to customers, as the date-time stamp determines the relevance of articles.
    Thanks,
    Suhas Yogin

    Try to adapt instance of com.day.cq.wcm.api.Page to com.day.cq.replication.ReplicationStatus and then use it's methods to get necessary data.

  • How do I remove date/time stamp?

    Upon uploading the pictures into the Lightroom 'library' none of them appeared to have the date stamp that they did in camera. After a few minutes, the date stamp for each started to appear. Seeing that they first loaded without the date stamp leads me to believe that I should be able to remove it easily. How can I do this without the hassle of cloning/cropping/editing. Is there a way to remove it from the metadata perhaps?

    Which data/time stamp are you talking about, and why do you want to remove it?
    I mean, it can probably be done using exiftool, but usually people want to keep it/them (or correct if wrong..).
    I mean #2, I think you can remove it from exports, e.g. using a plugin like Jeffrey Friedl's Metadata Wrangler (if Lr's coarse handling doesn't satisfy), or if Jeffrey's plugin won't do it, a plugin like Exportant would.
    Or if you just want to remove it from display - then press the 'i' key, or adjust view options, or define a metadata viewing preset...
    Rob

Maybe you are looking for