How to access current system date???

Hi Experts,
I am working on a process wherein a user creates a proposal and a notification is sent to the manager for approval.
Now i need to send the date of creation as a attribute to the manager.
Can anyone guide me as to how to get the current system date???
Thanks a lot.
Cheers
Gaurav Raghav

Hi Wojciech Matulewicz,
I have tried using this before and i faced this problem.
When i click on create proposal, the screen just refreshes and the CO execution doesnt ends.
Without ending this field, however things work fine.
here is the code:
Method technicalDescription()
IGPAttributeInfo date = output.addAttribute("DATE", IGPAttributeInfo.BASE_DATE);
            date.setMultiplicity(IGPAttributeInfo.MULITIPLICITY_1_1);
Method execute()
Date currDate = new Date(System.currentTimeMillis());
          contextElement.setDate(currDate);
Method complete()
output.setAttributeValue("Date", wdContext.currentContextElement().getDate());
If i comment out this code, the CO execution works out fine, but on addition of this code the screen refreshes and CO execution doesnt end.
Am i doing something wrong???
please help me out with this.
Thanks.
Cheers
Gaurav Raghav

Similar Messages

  • How to display current system Date in the Date Input field ?

    Hi,
    I am having a Date Input field( binded to Data type). On load, i would like to display the current system date filled in that input field.
    How do i achieve this ?
    Reg/Venkat

    Hi Venkatesan,
    In your view in your init() method add the following code:
    wdContext.currentContextElement().setOrderDate(new Date(System.currentTimeMillis()));
    this is if your Date-attribute is in the root of the context.
    else you have to set the date in the node where the date-attribute is present with:
    IYOURNODEElement node = wdContext.createYOURNODEElement();
    node.setOrderDate(new Date(System.currentTimeMillis()));
    regards,
    Björn

  • How to get current system date and store in db

    may i know how to get the current system date so that i can store it into the database

    java.util.Date is NOT deprecated, just most of its methods are.
    Use
    new java.sql.Date(System.currentTimeMillis());to get the current date. Note that the date in a client machine
    may differ from the clock of the server!
    BTW: java.sql.Date extends java.util.Date.
    Fritz

  • How to set current/system date to af:inputDate type field

    Hi,
    I am using <af:inputDate component to take date input from user. It is not a VO atrribute field. Could you pls suggest how to set system date to it as it loads on page by default.
    Regards,
    jitu

    Could you please provide the .jsff code as well. What you have used as value="#{bindings.date.inputValue}" in below code?
    <af:inputDate value="#{bindings.date.inputValue}"
    label="Sales Date"
    required="#{bindings.date.hints.mandatory}"
    shortDesc="#{bindings.date.hints.tooltip}" id="id1"
    binding="#{bean.searchDate}">
    <f:validator binding="#{bindings.date.validator}"/>
    <af:convertDateTime pattern="#{bindings.date.format}"/>
    </af:inputDate>

  • How to insert the system date  using PreparedStatement

    How do I insert system date(from Orcale database) using
    PreparedStatement. I am aware that that oracle has date
    function 'sysdate' to retrieve the database current date.
    How Do i use that in the following syntax?
    Alertnative 1:
    String inssql =
    "insert into emp (empid, name, dept, updateDate) "+
    " values (?, ?, ?, ?)";
    PreparedStatement pstmt = conn.prepareStatement(inssql);
    pstmt.setInt(1, 123456);
    pstmt.setString(2, "Bougnon Kipre");
    pstmt.setString(3, "Rare Species Depatement" );
    pstmt.setDate(4, sysdate) // if this okay
    pstmt.executeUpdate();
    Alternative 2:
    String inssql =
    "insert into emp (empid, name, dept, updateDate) "+
    " values (?, ?, ?, sysdate)";
    PreparedStatement pstmt = conn.prepareStatement(inssql);
    pstmt.setInt(1, 123456);
    pstmt.setString(2, "Bougnon Kipre");
    pstmt.setString(3, "Rare Species Depatement" );
    pstmt.executeUpdate();

    Hi,
    The second alternative will be the best way.
    Since the alternative 1 won't work. sysdate cannot be accessed
    from java as a variable. Either use alternative two or create a
    java.sql.Date and insert it.
    Regards
    Elango

  • 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.

  • How to get the system date format string?

    Hello, everybody!
    I want to create a MaskFormatter with a mask for dates. So, I could suply as the constructor parameter: "##/##/####'. However, what if the year comes first in the current system date format settings, or the month is in the second place or in the first?... So, I can't just suppose that the current locale format for dates is like the one above. So, my question is: is there a way to get the SYSTEM DATE FORMAT STRING in Java? Searching in google I saw that this was already asked in this forum:
    http://forum.java.sun.com/thread.jspa?threadID=301034&messageID=1193794
    but there was no effective answer. Does someone already know how to get this?
    Thank you.
    Marcos

    Hi, not sure, but
    import java.text.*;
    SimpleDateFormat sdf = new SimpleDateFormat();
    System.out.println(sdf.toPattern());
    will output something like dd/MM/yy HH:mm
    hthThank you very much. It worked.

  • 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

  • Assign current system date to the existing variant of date field

    Hi Experts,
       I am working with BDC for data uploading. Here I have a different requirement that how to assign the current system date to the existing variant of the  date field .
    The date field is defined as:   select-options s_date type sy-datum.
    Anybody have an idea, pls let me know.
    please help me .
    appreciate your valuable suggestions.
    Thanks.
    Prasad.

    Hi,
    try like this...
    SELECT-OPTIONS: s_date FOR sy-datum DEFAULT sy-datum.
    Arunima

  • Current System date in report

    Hi,
    Iam working on BW reports. Currently iam with report which needs to get the current system date automatically in reports.
    Can anybody help me on how to get the current system date in report automatically.
    I tried in layout but it gives all info. But i need only current system date.
    I even tried variable of type sapexit under 0calday. but as it is an variable it filters values with reg to current system date.

    Hi Ucas,
    U have to write the code for the variable as follows:
    1) Go to transaction SMOD
    2) Enter 'RSR00001' in Enhancement field. Also select the 'Components' radio button. And press 'Display'.
    3) Double click on the function module 'EXIT_SAPLRRS0_001'
    4) Then, double click on code text 'INCLUDE ZXRSRU01'
    5) Now, u reach a screen, where u can write ur include program. U have to write, for example, 'INCLUDE my_code'. Then double click on this to include ur code inside.
    6) The code can be :
    CASE i_vnam.
        WHEN '<write ur variable name>'.
        CHECK i_step = 2.
        s_range-sign = 'I'.
        s_range-opt  = 'EQ'.
        s_range-low  = sy-datum.
        APPEND s_range TO e_t_range.
    ENDCASE.
    Assign points if u find the above info useful.
    Message was edited by: Vishesh Pahariya

  • Set current system date in a field on load of a page

    Hi APEX users,
    I read about a similar thread on the subject but I am just as confused.
    Simply I need assistance with the following:
    I have a page that has many fields and one of those fields is DATE_RESOLVED. This is a DATE Picker field but I want this field to show the current system date every time the form loads/reloads BUT yet give the user the ability to change the date if they should choose to do so by way of the DATE Picker calendar.
    How would I achieve this?
    Any help will be greatly appreciated. My form is functioning just fine but I just need to achieve this one last date function.
    Thanks in anticipation for your assistancel.
    Rick

    Hi Ric,
    the follwing should cover your requirements.
    a)
    On you main page screen, if you click on your particuar date item, say P1_MY_DATE
    set the follwing:
    #1 under Source,
    Source Used: only when current value in session state is null
    Source Type: Plsql expression or function
    Source value or expression: sysdate
    #2 under default
    default value: sysdate
    default value type: plsql expression
    b)
    On your main page screen, create a new page computation by clicking on the '+' icon next to computation on the left hand side (page rendering)
    location- item on this page (default) -> next ->
    compute item: select your item (P1_MY-DATE) -> computation point: Before regions ->computation type: plsql expression -> next ->
    computation: sysdate -> next
    (leave blank, unless you want this to be conditional) -> create
    done...

  • Text label to show current system date?

    I'm totally new to Flex Builder 2. To help me get off the
    runway, here's a simple question I'm almost embarrassed to ask:
    How can I get a text label to display the current system date
    please? <hides head in shame>

    http://livedocs.adobe.com/flex/2/langref/Date.html

  • DateNavigator: current system date properties

    Hi All;
    I need to help in using the DateNvigatorMarking API
    I am using WDDateMarkingCategory to change the color of the date.
    It is working fine, but for the Current System Date the changes don't apply.
    I am wondering how to change the properties for the current system date in the DateNavigator?
    Thanks in advance!
    Message was edited by: raja yakkanti

    Get the current system date and set the date value through the setAttributeValue().
    Date date = new Date(System.currentTimeMillis());
    IWDNodeElement element = wdContext.nodeMarking().createElement();
    element.setAttributeValue("date", date);
    wdContext.nodeMarking().currentMarkingElement().setDate(date);
    wdContext.nodeMarking().addElement(element);

  • Insert Current system date

    I'm making an application where when the user clicks the insert button the current system date is displayed in the textfield...How can i do this?

    txtField.setText( (new Date()).toString() );
    or
    txtField.setText( java.text.DateFormat.getDateInstance().format( new Date() );

  • How can I  get System dates  with time scheduler using threads

    how can I get System dates with time scheduler using threads.is there any idea to update Date in my application along with system Date automatic updation...

    What the heck are you talking about and whatr has it to do with threads?
    Current time: System.currentTimeMillis. Date instances are not supposed to be updated.

Maybe you are looking for

  • Udated computer; can't print anymore.

    Yesterday, my printer was working perfectly with my computer (Macbook Pro with OS X 10.5.8). I was printing a pdf in Adobe Acrobat Professional 8.1.6 on an Epson R1800 (no drivers installed). I got home from work tonight to start printing some weddin

  • New Mac mini terribly noisy during iPhoto slideshow

    Hi everybody I just bought a new Mac mini Core 2 Duo. In normal operation it runs silently as expected. But when I run a slide show in iPhoto the fan starts turning faster and faster and soon makes an awful lot of noise (sounds almost like a hairdrye

  • Another user who can't get this thing started, Listener will not operate!!!

    I installed from root, used port 8085 for the database (8080 used by Tomcat) and 1521 for the listener. Logged out, log back in as user oracle. Takes three full minutes to "start" the listener, but netstat -a does not show any listener on port 1521,

  • Focus to a webdynpro alv grid column after report_element_t100_message

    Hi All, I have an alv grid on my view. When I click a button, I'm making some checks for editable cells and if necessary giving a message to the user by using  report_element_t100_message method. After the message, I'm setting focus to the alv grid c

  • Digital Signature - fild signer_name

    Hi, I am with the necessity to find a solution to find the field signer_name shown in transaction DSAL. Already I searched the table: BALHDR unsuccessfully!! I need to create a " Z program" where I can enter with following " importation parameters" :