How to get the date and time of the last KM scheduled run

Hi Experts,
I had a scenario where i need to send the last date and last time when the KM schduler runned.?
Issue:
I have created a Km sheduler, in that i have written the jave code to retrieve the details from a function module and getting the output from Func module and sending an email  to one administrator.It worked fine for me.this scheduler will run for every 20 mins.
But now Abapers have included two import parameters in their Function module " Last date and last run".So i need to populate this iimport parameters dynamically.
How can i acheive this?
Please assist.Thanks in Advance.
Thanks
Sony.

java.util.Date date = java.util.Calendar.getInstance().getTime(); //retrieve a date object
java.text.SimpleDateFormat df = new java.text.SimpleDateFormat(dd-MMM-yyyy);
String s = df.format(date); //10-Aug-2001
String t = "15042001";
df.applyPattern("ddMMyyyy");
d = df.parse(t);
df.applyPattern("dd-MMM-yyyy");
t = df.format(d); //15-Apr-2001Hey it's Friday, I'm bored

Similar Messages

  • How to get system date and time?

    Can someone show me a code on how to get system date and time.
    Thanks!

    there is one really easy way to get system time, the api gives a great example of code on this. use gregorian calendar, which you'll find in the api under GregorianCalendar. You only need to create one instance of GC, ie Calendar time = new GregorianCalendar();
    you save seconds, minute and hours into int values, so you don't have to access the system time every second, you can create a thread which adds one to the int second value, if oyu see what i mean, for example, i have saved the hours, minutes and seconds as int values;
    int hour, minute, second;
    i can then create a thread (Thread thread = new Thread(this) and run it like:
    Calendar time;
    int hour, minute, second;
    Thread thread = null;
    public MyTime() {
    hour= time.get(Calendar.HOUR_OF_DAY);
    minute = time.get(Calendar.MINUTE);
    second = time.get(Calendar.SECOND);
    if(thread == null) {
    thread = new Thread(this);
    thread.start();
    public void run() {
    Thread t = Thread.currentThread();
    while(thread == t) {
    thread.sleep(1000);
    second++;
    if(second > 59)
    minute++;
    if(minute>59)
    hour++;
    formatTime();
    public void formatTime() {
    second = (second > 59? 0 : second);
    minute = (minute > 59? 0 : minute);
    hour = (hour > 23? 0 : hour);
    System.out.println(hour+":"+minute+":"+second);
    public static void main(String[] args) {
    new MyTime();
    I know this looks like gibberish but it should work. If not, try to fix the problem, i have written from memory really but i guarantee you, this gets the time then every second, simply adds one to the second and then formats time. You can also access the day, month and year then format them using the above code. I don't like giving code since you should really do these things yourself but it is 2:04am, i have nothing better to do and i am not tired so i did you a favour - i have become what i always did not want to, someone ho stays upall night writing code.

  • TO_DATE - How do I pass the date and time to the function

    Hi,
    I am writing a PL/SQL code. The code has a simple cursor,
    For the criteria, I am using a column called 'created' which is a date column, and the to_date function.
    I would like to pass the date and time to the to_date fuction as a parameter, date_value, as shown below.
    CURSOR opty is
    select a.name, a.id
    from s_opty a
    where a.created > to_date(date_value, 'DD/MM/YYYY HH24:MI:SS');
    I've tried declaring a bind variable,
    date_value date := '&1'
    but no joy.
    Any ideas would be welcomed.
    Thanks in antcipation
    Mukesh

    Can this help you?
    SQL> create or replace procedure sample_proc
      2  as
      3  cursor c1(v_value varchar2) is
      4          select 'YES' from dual
      5            where trunc(sysdate) = trunc(to_date(v_value, 'DD/MM/YYYY HH24:MI:SS'));
      6  v_char varchar2(10);
      7  begin
      8     open c1('08/03/2006 11:35:20');
      9     fetch C1 into v_char;
    10     dbms_output.put_line('Is it today''s date?> '||v_char);
    11     close c1;
    12  end;
    13  /
    Procedure created.
    SQL> begin
      2    sample_proc;
      3  end;
      4  /
    Is it today's date?> YES
    PL/SQL procedure successfully completed.
    SQL> If you are not very particular about the time, you can use TRUNC on both sides like :
    where trunc(a.created) > trunc(to_date(date_value, 'DD/MM/YYYY HH24:MI:SS'));Cheers
    Sarma.

  • Aperture was not able to adjust the date and time of the master file "2008-06-22 at 14-41-14.jpg" because it has a format that does not permit date modification.

    I can't seem to find a way to update the date/time of a master file. There is a format issue but I can't seem to figure out how to correct it.
    Aperture was not able to adjust the date and time of the master file “2008-06-22 at 14-41-14.jpg” because it has a format that does not permit date modification.

    Can you post an ipconfig /all from the server and the DC?
    Robert Pearman SBS MVP
    itauthority.co.uk |
    Title(Required)
    Facebook |
    Twitter |
    Linked in |
    Google+

  • HT5252 I tried to change my metadata date and got this   Aperture was not able to adjust the date and time of the original file "01769_p_h13ajyrm4bm0944.jpg" because it is locked or you do not have permission to modify it.

    I tried to change the metadata date.  It changed the date on my photo, but when I checked the box that said "also change my original file", it gave me this error message.
    Unable to change original file.  Aperture was not able to adjust the date and time of the original file “01769_p_h13ajyrm4bm0944.jpg” because it is locked or you do not have permission to modify it.
    Wassup?

    What is your Aperture version? The older versions of Aperture 3 had a problem to apply Metadata changes to the original file.
    If you are using the current version Aperture 3.4.5, try to repair the permissions on your Aperture library, if you have not already done so:
    Launch Aperture with the key combination ⌥⌘ held down and select "Repair Permissions" from the First Aid PAnel, that will appear.
    If that does not help, post back with more information on your original files - are the referenced or managed? Where is your Aperture library located? Since when do you have this problem? And what did you do directly before noticed the problem for the first time?
    Regards
    Léonie

  • How to get server date and time using java code

    Hi,
    I'm new to java. I have one doubt about getting date and time of the server. can anyone give some sample code to get that.
    thanks in regards
    Gopi.

    you need 2 things
    1. something on the application server which exposes the servers time/date
    2. something on the client which makes use of your time service
    for instance, you could write a ServerTimeServlet that clients can call to get the time according to the server. or, if you've got a database in the server, often database software will provide a Time procedure or similar that does this, so you can use a simple SQL query to get the latest time

  • How can I show the date and time on the pictures in iMovie

    I am trying to make a slide show.  The date and time the pictures were taken are the important information that I would like to show in the slide show.  However, I cannot find the way to do that in iMovie. 

    I am trying to make a slide show.  The date and time the pictures were taken are the important information that I would like to show in the slide show.  However, I cannot find the way to do that in iMovie. 

  • Where i will give the date and time of the session background process

    Hi.
    I created a program on XD01 by using Session Method.
    It is executed properly and process in forground also fine.
    What my problem is i want execute process of session in Back ground on that time i want give the Date and Time. I do not know where i will provide date and Time.
    I want Process the BDC Session after 2 days. How it is possbile. Where i will give the date and Time?
    With in these 2 days i want know the status of the Session Process. How i will check the status?
    Any body will explain these things with full flow of sequence.
    I do not want use the BDC Session by using RSBDCSUB. In that program there is no options for giving the Date and Time.
    Thank You.
    B. Krishna.

    Hi,
    While creating session through BDC_OPEN_GROUP function, populate HOLDDATE field to set lock on the created session till that date, say 31.12.2008 and you would like to execute your session on 1.1.2009 at 2:00 AM.
    Once session is created, create a batch job for program RSBDCSUB and schedule it on 1.1.2009 at 2:00 AM (server time).
    I am confident that it solves your problem.
    Regards,
    Prasanth

  • Resetting the date and time after the phone has be...

    Hi,
    I keep having to reset the date and time very time I turn my phone off. I was thinking it was to do with the battery so I fully charged it, turned it off then turned it on again and it asks me for the date and time.
    I only noticed this because I've had exams and I have to turn my phone off for them.
    Could it be a dying internal battery?
    I know with computers there's a BIOS battery that controls date and time. When they start to die the date and time are inaccurate.
    I'll have to find time to take it to the 3-Mobile shop either on Sunday or sometime next week if it is an internal battery problem.
    Thanks,
    Omar
    "A Jade stone is useless before it is processed; a man is good-for-nothing until he is educated."

    Hi omar3256
    I believe that there is a very small component on the motherboard which serves this purpose, although whether battery or sort of capacitor I am not certain. The N80 especially seemed to be prone to this failure.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • How to get exact date and time difference?

    Hi,
    When i am using the below sql statement:
    SELECT (TO_DATE('7/27/2006 05:00:15 PM','MM/DD/YYYY HH:MI:SS PM') - to_Date('7/27/2006 8:30:13 AM','MM/DD/YYYY HH:MI:SS AM')) * 24 hours FROM DUAL;
    the output is:
    Hours
    8.50055555555556
    But Actually it is 8.30
    So how can i get exact days and time difference between two dates in Oracle?
    Thanks....
    Regards,
    Suman Sakinala
    Edited by: SSN on Sep 19, 2008 1:27 AM

    Or more clearly (this time I have my date_from and date_to the right way around hehe!)
    SQL> ed
    Wrote file afiedt.buf
      1  WITH t as (select TO_DATE('7/27/2006 05:00:15 PM','MM/DD/YYYY HH:MI:SS PM') as dt_to,
      2                    TO_DATE('7/27/2006 08:30:13 AM','MM/DD/YYYY HH:MI:SS AM') as dt_from FROM DUAL)
      3      ,d as (select (dt_to-dt_from)*24 as diff_hrs from t)
      4  -- end of dates
      5  SELECT TRUNC(diff_hrs) as hours
      6        ,TRUNC(((diff_hrs) - TRUNC(diff_hrs))*60) as mins
      7        ,TRUNC(((((diff_hrs) - TRUNC(diff_hrs))*60) - TRUNC(((diff_hrs) - TRUNC(diff_hrs))*60))*60) as secs
      8* FROM d
    SQL> /
         HOURS       MINS       SECS
             8         30          2
    SQL>

  • How can I display the date and time from the playhead info as a subtitle ?

    Is there any way it is possible to display the video capture data and time during playback. I have seen some discussion on creating subtitles to do this, it would be nice if one could simply add a Title template with display fields for playhead information so that it automatically gets created during rendering.
    In case you are wondering why on earth anyone would want this, I would like to use this for display on multisport racing videos.
    Thanks

    There is a Date/Time title in the titles browser, does just what it says...

  • Does anyone know how to get specific date and time on an itouch

    I need secific times on  safari searches in my history, there is a legal implication and I need to know if its possible to get the info, or can an apple store get anything. the history is in there but it just gives the date not time.
    Thanks in advance

    a) Open the document with it's password.
    b) Pick "Duplicate" from the File Menu
    c) Pick "Save As..." from the File Menu.

  • How to get Date and time of the server?

    Hi, How can we get the date and time of the server while submitting a form using JSP? i.e I need the date and time , when the user is submittig a registration.
    Uma

    Upon receiving your data in your servlet, you can do the following to get the date,
    Calendar calendar = Calendar.getInstance();
    int dd = calendar.get(Calendar.DAY_OF_MONTH);
    int mm = calendar.get(Calendar.MONTH) + 1;
    int yyyy = calendar.get(Calendar.YEAR);
    String dd_mm_yyyy = dd + "/" + mm + "/" + yyyy;
    To get the time, simply take a look at the Calendar API to get the corresponding field.

  • How can i have the date and time show up on my canon vixia hf m50

    Cannot get the date and time to show up onscreen in ANY videos on my new vixia HF M50. Can somebody help me on this?

    Hello Jerrysulew, 
    You can show the date and time using the Captions option.  The process is described below.
    Add a new level of enjoyment to your scenes by decorating them. You can add animated graphics, stamps and even your own freehand drawings. The supplied stylus pen will be especially useful for decorating scenes.
    You can decorate scenes as they are being recorded.
    IMPORTANT
    The screens and settings that appear may differ depending on the model you are using.
    NOTE
    You can open the decoration screen when the LCD panel is stowed with the LCD screen facing away from the camcorder. In such case, make sure [Autostart Decoration] is set to [On].
    Decorating Scenes while Recording
    1. Touch [ 
    2. Touch [Decoration].
    3. The decoration mode screen appears.
    On the decoration screen, there is a canvas where you can draw freely, and a toolbar with tools lined up for creating your drawings.
    Select the tool you want to use from the toolbar, and make drawings on the canvas.
    Icon
    Tool name
    Function
    Pens and Stamps
    Select the type of pen or stamp and its color. You can also save a canvas or load a previously saved canvas.
    Animated Stamps
    Select animated stamps to add to your decoration.
    Captions
    Add the date, date and time, story title* or story theme* as a caption that will be included in the recording.
    Image Mix**
    Choose one of 27 different frames to add onto the canvas. Image mix can be used in combination with the pens, stamps and animated stamps.
    Freeze screen**
    In recording mode: pause the live video. Touch [ 
     again to restore the live video. You can add decorations to and record the frozen image.
    In playback mode: pause the playback. Touch [ 
     ] to resume playing back the scene.
    Minimize toolbar
    Minimize the toolbar to the top of the screen to view almost all of the canvas. Touch [ 
     ] to restore the toolbar.
    * Not available in 
     mode.
    **Not available in 
     mode and for MP4 movies.
    4. Use a tool from the toolbar as explained in the following procedures.
    5. PressYou can add decorations even while recording a scene.
    6. Touch [ 
     ] to exit the decoration screen.
    NOTE
    For AVCHD movies, decorations will appear in the thumbnails of scenes in the [ AVCHD Movies] index screen and gallery. For MP4 movies, decorations will not appear in thumbnails.
    To use [Pens and Stamps]
    1. Touch [ 
    The [Pens and Stamps] screen will appear.
    2. Select the desired pen or stamp from [Tools].
    Select Colors.
    Touch [ 
    Select white or black from [Colors].
    Alternatively, you can touch [ 
     ] and select a color from the displayed colors.
    3. Draw freely on the canvas.
    Touch [ 
     ] > [Clear] > [Yes] to clear the canvas and start again.
    NOTE
    The canvas with decorations can be deleted, saved, and loaded.
    You can save the decorated canvas right after a decorating action.
    If the memory that contains the canvas is initialized, the canvas will be deleted.
    To use [Animated Stamps]
    1. Touch [ 
    2. Touch one of the control buttons.
    3. Touch anywhere on the canvas to place the selected animated stamp. You can also drag some animated stamps to a different location.
    NOTE
    When the [Animated Stamps] tool is used, the date/time will not be displayed or recorded.
    To use [Captions]
    1. Touch [ 
    2. Touch [Date] or [Time].
    When recording a scene using Story Creator, you can also select [Title]
    (the story&&&&&&&&&s title) or [Story Scene] (the story scene category).
    3. Select the desired text settings and touch [ 
    Touch [ 
     ] (white text on dark background), [ 
     ] (white text) or [ 
     ] (black text).
    Touch the caption and drag it to the desired location.
    To use image mix
    1. Touch [ 
     ] to open the [Select Image] screen.
    2. Touch [ON].
    3. Touch [+] or [-] to select a different image mix frame.
    You can touch one of the memory icons at the bottom of the screen to read image mix frames saved on a different memory (When recording on or playing back scenes from a memory card).
    Touch [ 
     ] to mix the selected frame with the live video.
    NOTE
    When [Rec Media for Movies] is set to [ 
     ] (the built-in memory), you will not be able to select image mix frames saved on a memory card (For camcorders that have internal memory only).
    For AVCHD movies, image mix cannot be selected during playback or while converting a scene to standard definition (For camcorders that have internal memory only). Select the image mix during playback pause or before starting the conversion.
    To use freeze screen
    1. Touch [ 
    The control button will change to [ 
     ] and the picture will be frozen.
    Decorate the screen using the other tools in the palette.
    2. Press the
    The decorations created will be recorded with recording scenes that are on pause.
    Press the
    Touch [ 
     ]. The screen will return to normal.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • How to have the Date and Time appear on printouts

    The Date and Time used to appear (at the bottom right) on things printed from websites. For example, receipts from an online purchase, an article on the web etc.
    I am able to see the setting to appear at bottom right (in the "File" dropdown).
    Following a Firefox update, I no longer get that very useful "Time & Date Stamp".
    This is very frustrating. Can anyone help?
    Thanks,

    Are you saying you can see the date and time in the "Print Preview" or in the "Page Setup" dialog under the "Margins & Header/Footer" tab. The date and time won't display if it is not set correctly in the "Page Setup" dialog. Also, is this on one specific printer or many different ones? If this is only happening on one printer there may be a problem with the print driver, even though there would be probably more serious things going on than a missing footer. You could also experiment and create a pdf using "PDF Creator" at http://www.pdfforge.org/pdfcreator and see if it comes up on the created document.
    Hope this gives you some headway.

Maybe you are looking for