Jquery how to add days to a date and display in a sharepoint field

hi
I have a column 'Date' , where user will select the date . Another column Grace Period where user enters number. I have a column 'Due Date' = Date + Grace Period
I cannot use out of the box calculated column as it is not displayed in the newform.aspx.
Is there any way to achieve it
Thanks

To get & set value via jquery, you first need to download jquery and save query in your site. Later add jquery ref to your script then get the column value. Refer below thread:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/a9fb3163-109c-4309-96d2-4f2f19e6824a/sharepoint-and-jquerygetting-setting-sharepoint-form-fields?forum=sharepointgeneralprevious
http://stackoverflow.com/questions/8559559/javascript-to-get-sharepoint-form-field-value-to-a-variable
Since you are new so i would suggest you that first try with simple query on page then build the advance.
http://sympmarc.com/2011/05/03/adding-jquery-to-a-sharepoint-page-step-one-always/
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help

Similar Messages

  • How To Add Days into a Date from java.util.Date class

    I have a problem when i wants to add 2 or days into a
    date object geting by java.util.Date class. so please help me resolve this issue?
    for e.g i have a date object having 30/06/2001,
    by adding 2 days i want 02/07/2001 date object ?
    Code
    public class test2
    public static void main(String args[])
    java.util.Date postDate = new java.util.Date();
    myNewDate = postDate /* ?*/;
    Here i want to add 2 date into postDate

    Use Calendar...
    Calendar cal = Calendar.getInstance();
    cal.setTime(new Date());
    cal.add(Calendar.DAY, 2); // I'm not sure about that "DAY"

  • How to add days to a date?

    Dear all
    I work with jdeveloper 11.1.4
    I have created my BC.
    I have 3 attribute on Vacation entity.
    startDate
    numberOfDays
    endDate
    I want to set the endDate value to be startDate+numberOfaDays
    Can any one helps me.

    You can achieve the same by writing a small piece of code in EntityImpl class or backing bean,depends on the use case.
    if (VO.getCurrentRow().getAttribute("startDate") != null){
    Calendar cal = Calendar.getInstance();
    cal.setTime(convertDomainDateToUtilDate((oracle.jbo.domain.Date)VO.getCurrentRow().getAttribute("startDate")));
    cal.add( Calendar.DATE, numberOfDays);
    oracle.jbo.domain.Date domDate = convertUtilDateToDomainDate(cal.getTime());
    VO.getCurrentRow().setAttribute("endDate",domDate );
    In the above code the utility method "convertDomainDateToUtilDate" just converts the jbo.domain.Date to java.util.Date and "convertUtilDateToDomainDate" method does the reverse.
    The code above holds good for backing bean but if You need to implement the same in EntityImpl then you just have to tinker around the code to get the proper entity attribute and set them properly.
    Hope this helps.
    -Sanjeeb

  • How to add days to a date value in SQL plus

    I would like to perform what ADD_MONTHS does, but for days.
    I have tried ADD_DAYS with no result. It sais it doesnt recognise the column.

    Subtracting two dates gives the number of days beteen them. So, adding or subtracting a number and a date will increment or decrementthe date by that number of days.
    If you really want a function, then:
    CREATE FUNCTION add_days (p_date IN DATE,
                              p_days IN NUMBER) RETURN DATE AS
    l_ret_dt DATE;
    BEGIN
       RETURN (p_date + p_days);
    END;and you would cal it like:
    SQL> SELECT sysdate, add_days(sysdate, 5) FROM dual;
    SYSDATE     ADD_DAYS(SY
    29-NOV-2005 04-DEC-2005However, a function is certainly overkill for something that can be done simply as:
    SQL> SELECT sysdate, sysdate + 5 FROM dual;
    SYSDATE     SYSDATE+5
    29-NOV-2005 04-DEC-2005TTFN
    John

  • How to add days to a DATE variable?

    Hi,
    I want to run a query based on my date variable with subtracting 7 days from it. Thanks.
    p_date DATE;
    Select * from table where theDate between to_date(p_date , 'yyyy/mm/dd') to_date(p_date - 7, 'YYYY/mm/dd');
    Thanks.

    If p_date is a DATE data type variable why are you using TO_DATE? It is, by definition, already a date.
    WHERE theDate BETWEEN (p_date-7) AND p_date;

  • How can I add days to a date?

    I need to find a way to add days to a date. For example, today is 10/3/03 and I want to add 180 days to that. How do I do that? Here is my code so far....
    import java.util.*;
    import java.text.*;
    public class Loan
         String date;
         String loanEndDate;
         public void setDate()
    GregorianCalendar gregNow = new GregorianCalendar();
    Date now = gregNow.getTime();
    DateFormat shortDate = DateFormat.getDateInstance(DateFormat.SHORT);
    date = shortDate.format(now);
    public String getDate()
    return date;
    public void printLoanBegDate()
              System.out.println("Loan Beg Date: " + date);
         public String setLoanEndDate()
              loanEndDate = (getDate() + 180);
              return loanEndDate;
         public void printLoanEndDate()
              System.out.println("Loan End Date: " + loanEndDate);
    The output is displayed by the following program:
    public class DemoLoan
         public static void main(String[] args) throws Exception
         Loan anLoan = new Loan();
         anLoan.setDate();
         anLoan.printLoanBegDate();
         anLoan.setLoanEndDate();
         anLoan.printLoanEndDate();
    The output is as follows:
    10/4/03
    10/4/03180 - - Why does this print the 180 afterwards? How can I get that to display the date 180 days into the future??
    Thanks

    Re: storing your dates as Dates, I mean don't have a field in your class called "date" which is a String. Have a field in your class called "date" which is a Date. If one aspect of your class is a moment in time, then use the java class that best represents a moment in time: java.util.Date. Don't make things more complicated than they have to be.
    Re: adding, it's in the docs:
    http://java.sun.com/j2se/1.4.1/docs/api/java/util/Calendar.html
    and
    http://java.sun.com/j2se/1.4.1/docs/api/java/util/GregorianCalendar.html
    But anyway it's like:
    Calendar c = new GregorianCalendar(); // now
    c.add(Calendar.DATE, 180); // 180 days from now
    Date nowPlus180 = c.getTime();
    DateFormat shortDate = DateFormat.getDateInstance(DateFormat.SHORT);
    System.out.println(shortDate.format(nowPlus180));

  • How i can add days to a date using sql

    Hi.
    Sorry the question, it's a very simple question, but i'm not finding the answer to that.
    I need some function that act just like the function add_months, but instead adding months, it need to add days to a date.
    I've used the function add_days once, but now, my select returns an error code when i try to use that function.
    My Oracle version is Oracle8 8.0.5.0.0
    runnig under Linux.
    Thanks,
    Klaus Paul

    To add days just do date arthmetic. Ex
    SQL> select sysdate+10 from dual;
    SYSDATE+1
    05-MAR-00
    add_days is a not Oracle date function.
    null

  • Add days to a date

    Hi all,
    I want to add some days to a date and get the final date.
    Example : I have a date in a field GS_DATE as 06/15/2006. Now I want to add some days say 14 days to GS_DATE and get the final date as 06/29/2006. How can I get this.
    Waiting for replies. Thanks

    hi Raju,
    This thread has a solution to the same requirement as of yours
    Check this thread out
    Re: Function module for DATE
    call function <b>'RP_CALC_DATE_IN_INTERVAL'</b>
             exporting
                  date      = '06/15/2006'
                  days      = 14
                  months    = 0
                  signum    = '+'
                  years     = 0
             importing
                  calc_date = wa_date.
    Regards,
    Santosh

  • Require a function module to add days to a date?

    My purpose is to add days to a particular date and get the resulting date. I tried using this function module "RP_CALC_DATE_IN_INTERVAL", but the problem is this function module only accepts two digits for days. i.e. i am only able to add a maximum of 99 days to a particular date, but i do want to go further and add more so please tell me if there is any function module which shall help me add 3 digit days to a date.

    Hi Kiran,
    You can directly add days to the date.
    Eg:
    DATA date LIKE sy-datum.
    DATA days TYPE i.
    date = sy-datum.
    days = 100.
    date = date + days.
    WRITE date.
    Regards
    Wenceslaus

  • How to get days between two dates

    Hi ,
    How to get days between two dates.
    Regards,
    Ramesh.

    Hi Ramesh,
    REPORT ZDATEDIFF.
    DATA: EDAYS   LIKE VTBBEWE-ATAGE,
          EMONTHS LIKE VTBBEWE-ATAGE,
          EYEARS  LIKE VTBBEWE-ATAGE.
    PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
                TODATE   LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
    call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
      exporting
        i_date_from          = FROMDATE
        i_date_to            = TODATE
      I_FLG_SEPARATE       = ' '
      IMPORTING
        E_DAYS               = EDAYS
        E_MONTHS             = EMONTHS
        E_YEARS              = EYEARS.
    WRITE:/ 'Difference in Days   ', EDAYS.
    WRITE:/ 'Difference in Months ', EMONTHS.
    WRITE:/ 'Difference in Years  ', EYEARS.
    INITIALIZATION.
    FROMDATE = SY-DATUM - 60.

  • How to calculate days between two DATES

    How to calculate days between two DATES ?
    which is the functional module for that ?
    help me

    Hi,
    use function module : it works,
    HR_HK_DIFF_BT_2_DATES
    give output format = 03 and get the value in days.
    code is as below :
    data : DATE1 type P0001-BEGDA,
    DATE2 type P0001-BEGDA,
    YEARS type P0347-SCRYY,
    MONTHS type P0347-SCRMM,
    DAYS type P0347-SCRDD.
    date1 = '20070331'.
    date2 = '20070101'.
    CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
    EXPORTING
    DATE1 = date1
    DATE2 = date2
    OUTPUT_FORMAT = '03'
    IMPORTING
    YEARS = years
    MONTHS = months
    DAYS = days
    EXCEPTIONS
    INVALID_DATES_SPECIFIED = 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 : days.
    Reward points, if helpful,
    Regards,
    Sandeep Kaushik

  • Query on fetching the no.of days between Invoice date and due date in rtf template embedded BI Publisher Report

    Hi Experts,
    We have a requirement to fetch the value of 'No of days' between Invoice date and due date (Two variable date fields on the template) in an Analysis.
    Please let me know the procedure of how to achieve the same.
    Regards,
    Rev

    it's good for ideas but implementation a bit different
    Oracle Business Intelligence Publisher Report Designer's Guide
    This function provides a method to get the difference between two dates in the given locale. The dates need to be in "yyyy-MM-dd" format. This function supports only the Gregorian calendar. The syntax is as follows:
    <?xdoxslt:date_diff(‘format’, ‘YYYY-MM-DD’, ‘YYYY-MM-DD’, $_XDOLOCALE, $_XDOTIMEZONE)?>
    where
    format is the time value for which the difference is to be calculated
    Example:
    <?xdoxslt:date_diff(‘d’, ‘2006-04-08’, ‘2006-04-01’, $_XDOLOCALE, ‘America/Los_Angeles’)?>
    returns
    -7

  • How do you edit out the date and time stamp from a photo

    How do you edit out the date and time stamp from a photo

    You can blur it out with retouch
    The built-in "Retouch" brush in "Edit" mode should suffice, if the background is mostly uniform, and if you set the size of the brush to slightly wider than the bar width of the letters. For example, in this picture I removed the year from the date (in the lower right corner) by using the "retouch" brush and following the contours of the letters. (the screen shot is from iPhoto '11, but iPhoto 9 should give similar results).
    Regards
    Léonie

  • How to do reconcilization of ODS data and CUBE data

    Hi All,
    How to do reconciliation of ODS data and CUBE data,I know how to do reconciliation of R/3  data and BW data.
    Regards.
    hari

    Hi,
    create a multicube based on your ODS and cube, identify commen characteristics and perform the key figure selections; create then a query showing both information from the cube and ODS with perhaps some formula showing differences between key figures.
    hope this helps...
    Olivier.

  • How do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    how do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    ok so i have my own i tunes library - how do i get all my old apps onto my new library?

Maybe you are looking for

  • ABAP Help on Update Rule Needed

    Hello.  I am trying to write a routine on an key figure in an update rule.  Basically, I am trying to load a custom key figure with either a 1 or a 0.  Here is the pseudocode: IF (((GI_DATE - ACT_GI_DTE) < 0) OR   ((GI_DATE - ACT_GI_DTE) > 3) THEN   

  • Media Browser

    when the program opens,                                         It is not showing the media browser area Also to drag and drop area.

  • Why when searching reminders on iPad ios 8, do random dates appear?

    Since iOS 8, when I search my reminders, (I use a list for my shopping list),  random dates appear under the item and above the list the item is in. If I look at the individual item in normal view ( after cancelling the search), there is no date set

  • Can't download photoshop cc due to error A12E5???

    I can't seem to complete the download for photoshop cc which i have just paid for....... Starts to download then says cannot complete due to Error: A12E5?? What does this mean?? Please help.

  • Videos won't play on Firefox

    I have windows vista home edition, 64 bit; I have both IE 9 and Firefox although I mainly use Firefox.  I downloaded the latest flash player (11.9.900.170) to both IE and Firefox; the plug-ins are active.  Flash player plays on IE but not on Firefox;