Re: incrementing the current system time with 30 minutes

hi
in JSPinner i need to display the time but that time should be 30 min greater than system time
is that possible
reg
vino

1. Create a GregorianCalendar instance
2. Use roll() to add 30 minutes
3. Use getTime() to convert to a Date instance

Similar Messages

  • 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

  • CALCULATE 6 MINS FROM THE CURRENT SYSTEM TIME....................?

    Hi
    I want to subtract few mins (say 5 min , 10 min ,15 mins , max to 55 mins) from the current system time,
    ex-current time 00:40:00
    Subtract 5 mins(means 5 mins backward)
    Final time 00:35:00
    ex-current time 01:20:00
    Subtract 30 mins(means 30 mins backward)
    Final time 00:50:00
    Pls help me with this with a appropriate logic or FM..
    Thanks a lot in advance
    Basic Date and Time questions are not allowed. They have been answered umpteen times. Please search for them.
    Edited by: kishan P on Sep 1, 2010 12:05 PM
    Edited by: Matt on Sep 1, 2010 9:01 AM - And please do not post in ALL CAPITALS

    May be you can do something like this!
    data: l_time like sy-uzeit.
    data: l_time1 like sy-uzeit value '06'. "6 hrs to be deducted from system time
    move sy-uzeit to l_time. "this is system time
    "write l_time.
    "write:/ l_time1.
    SUBTRACT l_time1 from l_time.
    write:/ l_time. "This is 6 hrs behind system time
    Rajasekhar

  • CALCULATE 6 HOURS FROM THE CURRENT SYSTEM TIME....................?

    hi
    good
    i want to subtract 6 hours from the current system time,
    ex-current time 17.07
    Subtract 6 hours(means 6 hours backward)
    Final time 11.07
    Pls help me with this with a appropriate logic.
    Thanks a lot in advance
    mrutyun^

    May be you can do something like this!
    data: l_time like sy-uzeit.
    data: l_time1 like sy-uzeit value '06'. "6 hrs to be deducted from system time
    move sy-uzeit to l_time. "this is system time
    "write l_time.
    "write:/ l_time1.
    SUBTRACT l_time1 from l_time.
    write:/ l_time. "This is 6 hrs behind system time
    Rajasekhar

  • How cost;ly it is to get the current system time

    I am using this call "System.currentTimeMillis()" to get the current system time. I need to now how costly it is to get the current system time.

    Why don't you time it -:) Run it 10000 times and print the first and last result. The difference is the time it took.

  • How to pass Current System time in the target field?

    Hi Experts
    kindly help me in mapping a field in which I have to map current system time.
    I think there is no standard function for time like the date so do i write a UDF for the same or any other way an in case a UDF than please help in that.
    Thanks
    Aprajita

    Hi Mathur,
    kindly help me in mapping a field in which I have to map current system time.
    I think there is no standard function for time like the date so do i write a UDF for the same or any other way an in case a UDF than please help in that.
    Mathur no need to write UDF for that..
    Use standard function Current date-------> In that (Target Format) u have to specify the time i.e: HHmmss
    Thats it..... Noe use this function as u like...
    Satya Kumar

  • I need to get the Current System Date and time in the format

    I need to get the Current System Date and time in the format
    *6/24/2009 11:30:29 AM*
    How do i do it ?

    I seem to be saying this a lot lately.
    Google is your friend.
    I googled "java current date format" and SimpleDateFormat featured prominently in the results.

  • Howto Current System Time in the format YYYYMMDDHHMMSS

    Hi, Is there a way to calculate current system time in java so the output will be in the format YYYYMMDDHHMMSS?

    Create a Date object from the system time:
    long now = System.currentTimeMillis();
    java.util.Date date = new java.util.Date(now);
    System.out.println(date);
    You can then use the SimpleDateFormat class to format the Date however you want.

  • How can I make the current date/time be sent when emailing as XML?

    I'm creating a form for a customer to use for submitting print jobs. This customer will be emailing the XML form data, which will in turn be converted into a production order. I'd like to make the PDF form capture my customer's system time, so that I know when they filled out the form. I COULD just leave that up up the customer and use required current date and time fields, but that provides the ability for the customer to falsify that information.
    Is there any good way to capture the current date/time in the XML data, so that the customer doesn't need to nor has the ability to?
    Any suggestions would be great!

    You can use the following methods getHours(),getMinutes(), and getSeconds() from the date object to obtain the values for hour,minute,and second.
    Click here to see an example:
    http://66.34.186.88/LiveCycleSamples/.3bbc2f4b.pdf

  • Creating a field or workflow that responds to the Current System Date.

    In our activities/tasks we have a field that is the Expected Completion Date or Required Completion Date. Based on that date, and the current date, I want a workflow to trigger when the required completion date is less than 30 days away, sending daily reminders to the owner/manager that they have a activity/task due.
    The way I see it I have two options.
    1. Customize a field to be the system date. Create a workflow that says every time that field changes, and the date is within 30 days of required completion date, send out an email.
    2. Create a workflow that somehow incorporates the current/system date, and do the same thing as above, substituting the field with the actual date.
    I don't know how to make either of those options happen. Does anyone either have other options or advice on how to make this work?
    Thank you in advance!

    Hello Cyril,
    Here is an idea that could be done:
    You could create a dynamic step by having a step that holds all the properties for both configurations (the superset of the necessary variables) and an extra one that indicates which 'mode' the step is in.  Then you create the main Edit substep in whichever language you desire.  That substep window will then have a box/dropdown/etc. at the top you can use to choose between modes A & B.  When the user changes the value, you would dynamically change the rest of the window to contain the appropriate properties for mode A or B.  You then copy the property values in that window to the Step properties, and copy the mode to your variable and you can run the step in that mode.  When the step then runs, it checks the mode variable, and depending on its value, it will run the step in mode A or B.
    Now we could add a dialog that allows us to choose when we put a step down but we should still allow the user to change later via the Edit substep we create.
    I don't think we can create something that inserts a completely different step, but we can have one step that has the ability to do both and we can pick which one we execute.  Also note we still don't have the ability to edit the Panels for a step, so we have to use a new window that we call from our Edit substep to complete the step.
    Hope this helps.
    Regards,
    Olivier L. | Certified LabVIEW Developer

  • Hyper-v replication Error Hyper-V received a digital certificate that is not valid from the Replica server 'burstingreplica'. Error: A required certificate is not within its validity period when verifying against the current system clock or the timestamp"

    Hi,
    When trying to initiate hyper-v replication from the main server i'm getting this error in the event logs.
    Hyper-V failed to enable replication for virtual machine 'RECADemo': A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file. (0x800B0101). (Virtual Machine ID 561591B6-567C-...)--I'm using certificate based auth and cert is installed/recognized on both machines.Please help.Thanks,Jaffer
    Jaf

    Hi,
    This error occurs because the Microsoft Certificate Trust List Publisher certificate expired. A copy of the CTL with an expired signing certificate exists in the CryptnetUrlCache
    folder. Please try to renew the Trust List Publisher certificate.
    The related KB:
    Event ID 4107 or Event ID 11 is logged in the Application log in Windows and in Windows Server
    http://support.microsoft.com/kb/2328240
    How to Renew the Site Server Signing Certificate (Microsoft Certificate Services)
    http://blogs.technet.com/b/configmgrteam/archive/2009/02/11/how-to-renew-the-site-server-signing-certificate-microsoft-certificate-services.aspx
    Manage Trusted Publishers
    http://technet.microsoft.com/en-us/library/cc733026.aspx
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to filter list items by current system time in search result wp or result source SharePoint 2013

    I want to display Items with PressDate less than or equal
    to current time in my search result webpart in SharePoint 2013.
    It is working fine for current date but not considering current time.
    {searchTerms} ContentType="ABC" PressDateTime<{Today+1}
    Above query not supporting for Now(), due to that it
    is showing items which are less than or equal to current (today's) date.
    How can I compare time with current system Time?..Thanks in advance.
    Regards, --NP

    You can achieve the same by using a Current Date Offset in a CAML Query to Filter List Items.
    Have below links for your reference.
    Sharepoint Tips And Tricks
    CAML Query to Date prior to 30 days from today
    Thanks.

  • Accesing the Microsecond system timer

    Greetings.
    I'm currently using a Timer timer to create Events which I use to create FPS (frames per second) in a game. However, it appers that the Java Timer class has the same limitations as MFC, which is that the timer can only go to something like 55 Milliseconds, even tho it lets you set it as low as 1 ms.
    Even if I could set my timer to 1 ms and have it cause events that fast, I'm not sure if that would be fast enough, so I'd like to get ahold of the microsecond system timer like is possible in C++.
    Want to know if this is even possible, and how if it is.
    Thanks

    Ok, got the system timer thing figured out. Using the JMK and SystemTimeBase.getNanoseconds(), I can get ahold of a long: 999494375000000000
    Which is obviously too long to fit in a long, which the compiler is quick to remind me. And I'm not sure how to get it into a long because simply dividing doesn't work.
    can't seem to get it into a string or just ahold of part of it (preferrably the beginning) or anything.
    So, if there's a nice way to do this that would be great!
    And while we're at it... is there a way to get ahold of the system frequency, like with Win32 QueryPerformanceFrequency ( as quoted in previous reply to my previous post, thanks!).
    Thanks!

  • How to get/display  time with minutes in a test item

    Dear experts,
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)I've the following requirements.
    In my form, there are three text items and one save button.
    Text items named as
    No_of_days --> Number data type
    (user will enter number of days)
    hours_limit --> Char data type with format mask (HH:MI);
    (user will enter hours with minutes)
    Upto_date_time --> date data type;
    this field calculated as (No_of_days+hours_limit+sysdate)
    User will enter No_of_days or hours_limit:
    Based on the values I've to calculate Upto_date_time
    Here is the problem:
    1) If user doesn't enter hours_limit I want to show default time as " 04:00 PM"
    2) If user enter hours_limit field we should allow them to enter in the following format
    "HH24:MI" format;
    what whould be suitable data type for hours_limit field..
    I tried with char and i've set the format mask as ,
    set_item_property('BLOCK3.hours_limit',format_mask,'HH:MI');
    But I'm geeting the error
    "FRM-50027:Invalid format mask for given datatype"
    Please help to solve this problem,
    Regards,
    Karthi

    Hi vansul ,
    set_item_property('BLOCK3.hours_limit',format_mask,'HH:MI');
    Format mast is only allowed to date data type fields.If i set the hours_limit item's data type as date , I'm getting the error message "ORA-01843:Not a valid month"..
    How could i make this field only getting or display time with minutes?
    Regards,
    Karthi

  • Use of dynpro services is not possible in the current system status

    Hi,
    I am new to all of this and new to SAP. I will bew self learing my way into CRM SOA,  working with the web service creaiton i keep getting the following errlr when rtying to Activate a new created web service:
    "Use of dynpro services is not possible in the current system status"
    not knowing the system that well i wonderin if there is missing configuration. This is CRM 7.0
    Exception Class CX_SY_SEND_DYNPRO_NO_RECEIVER
    Error Name DYNPRO_SEND_IN_BACKGROUND
    Program SAPLSKEY
    Include LSKEYU03
    Line 33

    Hi Keith,
    Welcome to the SCN forums!
    SAPLSKEY
    You should first check your Abap dumps using tranaction code ST22, this usually provides more detail on the problem.
    In this case I think it's trying to return a screen (or pop-up message) that can't be handled while activating the web service. The "SAPLSKEY" tells me that it might be licence related, do you have a valid developer's licence for Abap development work? If not apply for one (find out the procedure from other Abap developer's that you may work with) & check if that makes a difference while activating.
    Regards, Trevor

Maybe you are looking for

  • Problem with Nokia Music Manager 2.0 converting mp...

    Hi everyone! I have a problem using the Nokia Music Manager 2.0. I want to convert some mp3-files into "Mobile Optimized Format". If a start conversion it fails and says Track cannot be converted because it is already in the target format or file for

  • How do I collect my free Lifecycle Designer for upgrading to Acrobat XI?

    Just had an hour long run-a-round with customer support over this ... Important P.S. for LiveCycle Designer Users! You've probably already heard that LiveCycle Designer will no longer be shipping with Acrobat XI. But don't panic. For those of you who

  • Certificate and Webservices

    Hi. I'm tring to use UTL_DBWS package to comunicate with a webservice but when I execute my function I get this error: javax.net.ssl.SSLHandshakeException.    : sun.security.validator.ValidatorException: No trusted certificate found I believe this ha

  • HOW ADD TEXT TO PHOTO

    I HAVE ELEMENTS 6.  BEEN TTRYING TO ADD TEXT TO PHOTOS TO NO AVAIL. THIS IS HOW I HAVE BEEN DOING IT. TELL ME WHERE I AM NOT DOING IT RIGHT.     I DBL CLICK ON THE PHOTO TO BRING IT UP,   THEN I CLICK FULL EDIT,     THE I GET THE "T" FOR HORIZONTAL A

  • Charging Zen V plus Batter

    Hey?I got my creative zen v plus a couple of days ago and im new to all this sort of thing, i was just wondering if like a mobile phone it is better for the zen if you dont charge it up untill its completely flat as it will make battery life last lon