How to get the current date in a workflow

Hey,
Can anyone tell me how to get the current date while in a workflow?
Thanks in advance.

Here is how we did it, hope it helps
<defvar name='locCalendar'>
<new class='java.util.GregorianCalendar'/>
</defvar>
<defvar name='dateFormat'>
<new class='java.text.SimpleDateFormat'>
          <s>MM/dd/yyyy</s>
     </new>
</defvar>
<defvar name='formatedDate'>
     <invoke name='getTime'>
<ref>locCalendar</ref>
</invoke>
</defvar>
<invoke name='format'>
<ref>dateFormat</ref>
<ref>formatedDate</ref>
</invoke>

Similar Messages

  • How to get the "current date" in the BEx?

    Hi all,
    I need to get the "current date" in my Bex report in order to make a comparison. I know there is a "How to" which shows how to get the current date via a User Exit, but I didn't find it. Could you please help me?
    Thanks

    1. Create a  New Formula in Key Figures structure
    2. Give tech name and description and Select "New variable" option
    3. Next screen will launch Variable Wizard -> create a new variable with replacement path as processing type
    4. in next screene  select the date characteristic that represents the first date to use in the calculation (From Date)
    5. In the next  screen select Key in the Replace Variable with field. Leave all the other options as they are
    6. In the next Currencies and Units screen select Date as the Dimension ID.
    6. Save variable
    repeate the Above steps to create another variable (To Date)
    and now you can use these two new replacement path variables in your new formula.
    Dev

  • How to get the current date ? in the form of dd/mm/yyyy?

    Hi all,
    As getDate( ), getMonth( ), and getYear( ) is depricated, how to get the current date or System date, month and year ? please help ??
    Regards
    Ashvini

    HI,
    Than u for the reply. But i am getting one error.
    as u said, I tried to do so.........
    but, i am getting one error.
    code
    Calendar cald=(Calendar.getInstance.getTime());
    out.println(cald);
    error message
    validate$jsp.java:86: Attempt to reference method getInstance in class java.util.Calendar as an instance variable.
    Calendar cald=(Calendar.getInstance.getTime());
    ^
    1 error
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
    Pls help
    Regards,
    Ashvini

  • How to get the current date and compare dates

    hi
    does anyone know how you would get the current date?
    furthermore, how to compare the current date with a past date to see how many days or months have past since then?
    thanks

    have a look at the Date class. new Date() creates an object containing the exact date and time at creation time. (Date).getTime() might be useful for comparing two dates. GregorianCalendar might be useful, too.

  • How to get the current Date

    With the following piece of code, I am able to get the current date in bpe forms, but not when I put it in any of the forms logged in using end user(not even in end user menu).
    <Field name='request.submitDate'>
    <Display class='Label'>
    <Property name='value'>
    <invoke name='dateToString' class='com.waveset.util.Util'>
    <ref>java.util.Date</ref>
    </invoke>
    </Property>
    </Display>
    </Field>
    The following error is getting displayed in the end user menu form.
    XPRESS exception:
    Can't call method dateToString on class com.waveset.util.Util ==> java.lang.NullPointerException: -------can anyone please help me out
    or can anyone suggest a way for getting the current date
    Regards
    Gajendra Nagapurkar

    The <ref> tag is used to refer to the value of some variable. The value of the variable java.util.Date in your example is NULL, because it doesn't exist!
    If you remove that argument from your <invoke>, the call resolves to the method com.waveset.util.Util.dateToString() and will return something like "20050810 11:00:21".

  • How to get the Current Date in webdynpro java

    Hi Experts,
                 In my project i have two date input fields called
                        1)Start Date
                      2)End Date   
    and one Absence type input field is there. The user wants to set the start Date ,End date and absence type.
    How to get the user set values in my project.i.e how to get the user inputs and the started date must be current date of the system and end date must be after the 3 months.
    Can any body send code regarding this.
    Thanks in advance.
    Regards,
    Venkat.
    Edited by: Venkat5939 on Jan 11, 2011 4:46 PM

    Hello Venkat,
    Current Date:
    Date date = new Date(System.currentTimeMillis());
    For getting the date after three months refer the following threads:
    Set date in a date field
    Date Function
    date format
    Hope it helps.
    Regards
    Nizamudeen SM

  • How to get the current Date from the system?

    How do I acquire the current date from the system? Also, if possible, can I assign the day, month and year separately into three variables and how? It would be thankful if some simple Example could be given. Thanx!

    import java.util.*;
    public class count {
    public count() {
    Calendar now = Calendar.getInstance();
    int month = now.get(Calendar.MONTH);
    int day = now.get(Calendar.DAY_OF_MONTH);
    int dayyear = now.get(Calendar.DAY_OF_YEAR);
    int year = now.get(Calendar.YEAR);
    int a = 365;
    int b = a - dayyear;
    System.out.println("The day is the" + " " + day);
    System.out.println("IT is the" + " " + month + " " + "month of the year");
    System.out.println("The year is" + " " + year);
    System.out.println("This many days till next year" + " " + b);
    public static void main(String[] args) {
    count cou = new count();
    }

  • How to Get the Current data into Planning Layout from the Planning cube

    Hi,
    I have a problem in BPS.   I am selecting the data from cube based on Month org details but I want to see the latest data.   How can i get this data into planning cube.
    Like
    data
    Tran           cal month            org               amt
    1                 jan                        a                  100
    1                 feb                        a                   200
    if i want to read based on Tran org as input values I shoud get the below data but I am getting the previous data.   
    Tran           cal month            org               amt
    1                 feb                        a                   200
    Kindly help me in this regard
    Thanks
    Naveen

    Naveen,
        Are yo having issue when you save something in the layout, the data doesn't appear in the listcube ? Or do you have issue that the latest data you see in the cube doesn't appear in the layout ?
    For the former issue, please look at your selections of listcube and for the second issue, please check your planning level definition, make sure all the restrictions you have applied are valid for this latest data to be presented in the layout.
    Hope this helps.
    Cheers
    Srini

  • How to get the current data and time of SCOM server via SCOM SDK (API) calls?

    Hi,
    I need to read the current date and time of SCOM server via SOM SDK.
    Is there a class in SDK that provides this info ?
    Thanks,
    satheesh

    To get time and date of Alerts of SCOM, You can use following command let "get-scomalert"
    Also, You can refer below links
    http://blog.tyang.org/2013/02/21/using-scom-2012-sdk-to-retrieve-resource-pools-information/
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical

  • How to get the current date using HTMLB JSP page

    Hi All, I developed an iview with several fields using PDK, I would like to know how can I include for a date field a dynamic value witch in this case is the current date.
    <hbj:inputField
    id="Date"
    type="date"
    maxlength="10"
    showHelp="TRUE"
    required="TRUE"
    value="???"
    />
    Thanks in advance
    Alexis

    Hi Alexis ,
    u can use the setDate("3.12.2003") function to set date for this input field.
    u just change the id = Date , because in jave we have Date class. rename it to another name..
    suppose id = systemDate
    <%
    Format formater = new SimpleDateFormat("dd.MM.yyyy");
    Date syDatum = new Date();
    %>
    then
    put
        systemDate.setDate(formater.format(syDatum));
    this will set the date .....
                        Regards
                        Kishor Gopinathan

  • How to get the current date in standby display?

    My N73 ( 3.0705.1.0.31 ) displays the current date/day only in the general profile. When I switch to any other profile, that place is taken over by the profile name.
    Is it possible to get the date/day displayed in a non general profile?
    If it is otherwise, the 240x320 display is of little use...
    V 4.0727.2.2.1
    04-07-2007, RM-133
    (C) Nokia N73 (Z5.01)

    That's the way it goes. In addition you see the date/time on the screensaver with every/any profile.

  • How to get the current transaction variant ?

    dear guru,
    could you please tell me how to get the current transaction variant?
    i tried the following method:
      DATA l_tcvariant TYPE tcvariant.
      CALL 'DY_GET_TX_VARIANT'
         ID 'VARIANT' FIELD l_tcvariant.
    but it failed.
    best regards.
    zj

    Try something like this
    DATA:  VARIANT LIKE SHDTVCIU-TCVARIANT.
      CLEAR VARIANT.
      CALL FUNCTION 'RS_HDSYS_GET_TC_VARIANT'
       IMPORTING
         TCVARIANT                     = VARIANT
    *     FLAG_CLIENT_INDEPENDENT       =
    *     RC                            =
    *   TABLES
    *     T_SCREEN_VARIANTS             =
    *     T_INACTIVE_FUNCTIONS          =

  • How to get the current month number

    Hi everyone,
    Does anybody know how to get the current month number in Oracle Discoverer Worksheet calculation?
    I try to use EUL_DATE_TRUNC(CURRENT_DATE, 'MM'), but instead I got 01-AUG-00.
    If I change the data display format to MM, it will give me "08" but if I use TO_NUMBER function to convert it to number I get error "invalid number"
    Is there anyway to get the current month value in number? Thanks

    Scott,
    Thank you so much! It works perfectly! :)
    Hope you have a great day ahead!
    Cheers,
    Angeline

  • How to Get the Current Workitem id at runtime

    Hi All,
    I have a scenario, where request pending with a user who has already resigned the organization. The requirement is that we need to provide a report
    of the request and with whom it is pending with along with the workitem id with a forward push button.
    So that if the user identifies that a request is pending with someone he can click the record and press for the forward button and a pop-up to be showed where he can enter the userid to whom he needs to forward it.
    In this scenario can anyone tell me how to get the current workitem id at run time and to save it to a custom table.
    I tried with method before workitem execution, but here i am not getting the current workitem id.
    Can you please suggest a good solution for this.
    Thanks and Regards,
    Balaji

    Karri,
    I think i can explain you with an example.
    Here is my Scenario.
    A user has raised a Gate pass and it went to all approval's and got approved and the material is also sent out from the plant. Lets take the date as 1.1.2013 (A Warehouse person have done the checking and sent out of the plant).
    On 1.3.2013 some of the material has been returned and a material inward request has been raised and now the warehouse person has to do a inward checking and to sent it back for the initiator for the approval, but the warehouse person has resigned the organization on 1.2.2013, now the workitem is pending with the warehouse person who has already resigned.
    My scenario is once the material inward request is created and before the workitem is delivered to the warehouse person i need to get the workitem id and to store the workitem some where.
    So that in future if any warehouse dept head wants to forward the workitem which are lying in the person inbox who has already resigned he can do it via a report using this workitem id.
    So, can anyone help how to get the dialog workitem id before the workitem creation or execution. I tried with "method before workitem execution" but my break point is not triggering at this point.
    Thanks and Regards,
    Balaji

  • How to Get the current month at timezone UTC-10

    Hi All,
       can you please let me know How to Get the current month at timezone UTC-10.
    Function module ? which date and time needs to pass.

    Hi,
    Try with following code.
    DATA zdate TYPE  D.
    DATA ztime TYPE  T.
                      CALL FUNCTION 'ISU_DATE_TIME_CONVERT_TIMEZONE'
                        EXPORTING
                          x_date_utc          = sy-datum
                          x_time_utc          = sy-uzeit
                          x_timezone          = 'UTC-10'
                       IMPORTING
                         Y_DATE_LCL          = zdate
                         Y_TIME_LCL          = ztime
                       EXCEPTIONS
                         GENERAL_FAULT       = 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 : zdate, / ztime.
    Thank you,
    Sekhar.

Maybe you are looking for

  • IPhoto 11 Migration Issue: Unique Circumstance (Boot Drive Crash)

    Hello good folk, I have a migration issue with iPhoto 11 due to a boot drive crash. The issue: I have imported my library database file and all of my 25,000 photos into a clean install of iPhoto 11. All of the events are imported, but all of the phot

  • Enumeration binding for combo box - missing feature

    Hi, In our application, combo boxes are usually employed for similar purpose as radio button groups: provide the end-user with an exclusive, static list of choices. Unfortunately, JUComboBoxBinding.createEnumerationBinding method does not seem to fol

  • Problem getting the row  element

    hi     i have a scenario where  i have  filtered data from    3 listboxes  and  populated the data in the  table .   now  the table contains  about  10  rows  .   now  i need to select a particular  row  in the  table     and  catch the particular ro

  • JSF vs. XSLT

    Hello all, We want to design a new application. I have been debating whether to use JSF with XSLT or to stick to XSLT alone in the view layer. In this application the front-end makes SOAP calls to the business tier so all the data is already in XML.

  • Edit HD footage in a PAL timeline

    Hello gurus! I will be editing a commercial with the latest FCP installed on my laptop. The commercial will be shot entirely on a Phantom Camera (1920x1080 HD). I will export the Phantom footage to TGA or Tiff sequences and then import them into FCP.