How to calculate a date on a form?

I am working on a form for our clients and our staff to use and I asDects to calculate a date for another date. We currently use an Excel worksheet that works very well, but we begin to encounter customers who do not have access to Excel. Having the form of Adobe would give us more flexibility.

Here is an example of exactly what I need:

Last read Date: 01/01/00

Approximate Due Date_1: 26/01/00 (this is the Date of the last reading + 26 days)

Approximate Due Date_2: 26/02/00 (this is the Date of the last reading + 56 days)

Approximate Due Date_3: 26/03/00 (this is the Date of the last reading + 85 days)

Thank you

Check out this previous topic: http://forums.adobe.com/thread/836872

Tags: Acrobat

Similar Questions

  • How to calculate stock data aging

    How to calculate inventory aging of data:
    _*PRS_DTE*_     _*PRD_COD*_     _*PRD_TYP*_     _*DRB_QTY*_     _*CRD_QTY*_
    15/07/2011     2012001234           1                           100                              0
    15/08/2011     2012001234           1                           200                              0
    16/08/2011     2012001234           1                           0                              50
    15/06/2011     2012001234           1                           125                              0
    15/09/2010     2012001234           1                           150                              0
    On top of the data, balance the stock of data is produced * 525 * by subtracting CRD_QTY from DRB_QTY. Now his result of aging from 18 September 2011 "should be like this:"
    _*PRD_TYP*_     _*PRD_COD*_        _*90 Days Stock*_     _*Less than 90 and from the start of year Stock*_   _*2010 Stock*_   _*2009 Stock*_   ...and so on upto previous 5 years
             1                2012001234                   300                                            125
             100                    0               ...
    Can I get this SQL result? I do not want to write cursors and loops to get the above given the result even if it is possible.

    Hello

    kamranpathan wrote:
    Dear Frank, thank you again for an impeccable answer. Sorry for a delay feedback coz I was sick of a fever. I tested the provided query u n that has worked well. but I did not understand then u points marked the end of the answer of the urs:

    Prs_date is a DATE: don't try to INSERT a VARCHAR2 value into a DATE column.
    

    If 20/SEP/2011 ' is not the correct format, so what fix the Date Format?

    In Oracle SQL, anything inside single quotes is a VARCHAR2. (There is an exception; I'll be back later.)
    "a,"
    '2' and
    "the square root of 9'.
    are all inside single quotes, so they are VARCHAR2s, not numbers. A human being who sees these chains might think of figures, but they are still VARCHAR2 strings and not numbers.
    20/SEP/2011 '.
    'September 21, 2011', and
    'Yesterday '.
    are all inside single quotes, so they are VARCHAR2s, not DATEs. A human being who sees these chains might think of DATEs, but they are still VARCHAR2 channels and not dates.
    When you use the wrong data type (for example, when you use a VARCHAR2 in a place where we expect a DATE) Oracle will try niot very hard to trigger an error. It will try to convert a DATE VARCHAR2. Sometimes it can work, other times it cannot. It is never a good idea to expect that such implicit Conversion will work; You must always use the correct data type instead. For example, the prs_dte of the aging_test table column is a DATE. When you say:

    INSERT INTO aging_test (prs_dte) VALUES (x);
    

    Oracle expects x as a DATE, so do not put some other datatype as a VARCHAR2 in place of x.
    The TO_DATE function returns a DATE, so a correct is to INSERT a line in aging_test:

    INSERT INTO aging_test (prs_dte) VALUES (TO_DATE ('20/SEP/2011', 'DD/MON/YYYY'));
    

    This is an example of a +Explict Conversion +. The TO_DATE function expects two arguments to be VARCHAR2s, and that's exactly what they are in the example above: the two arguments are of the literal string, enclosed in single quotes.

    There is an exception, as I mentioned. When the DATE keyword (or TIMESTAMP) comes immediately before the first single quote, then single quotes, everything that comes between them and the keyword itself form a DATE literal (or a literal STAMP, but I'll just talk about DATEs in the future). The stuff between single quotes must be in YYYY-MM-DD format, otherwise you will get an error. So another acceptable way to enter a row in the aging_test table is:

    INSERT INTO aging_test (prs_dte) VALUES (DATE '2011-09-20');
    

    It is only as good as in the example above (those used TO_DATE), and has the same results. You can use any you like.

    the age_prd can never be ' 'Less than 90 and from 01/01/2011'. 
    

    Yes my dear, in my case that I really need this period of aging, I don't know why, but sometimes, being a service Department (IT), we fullfuil insensitive logic of user.

    Remember how BUSINESS works.
    When you say

    CASE
        WHEN  c1  THEN  r1
        WHEN  c2  THEN  r2
    END
    

    the c1 State is evaluated first. If c1 is set to TRUE, then the CASE expression returns r1, and the rest of the CASE expression is not evaluated.
    What happened in this CASE of expression, where x is a NUMBER?

    CASE
        WHEN  x > 0  THEN  'Positiv'
        WHEN  x = 2  THEN  'Zwei'
    END
    

    This CASE expression will never return 'Zwei', because the condition "x = 2" is just a special case of the prior"x > 0". If this CASE expression is executed when x = 2, then the 'x > 0' condition is evaluated, it turns out be TRUE, and "Positiv" is returned. The following condition is not even considered.
    In the expression you have posted:

    `        Case
                 When Age.Prs_Dte Between (Sysdate - 90) And Sysdate Then
                           '90 Days'
                 When Age.Prs_Dte Between (Sysdate - 61) And Trunc(Sysdate, 'RRRR') Then
                           'Less than 90 and from 01/01/2011'
    ...
    

    the value 'less than 90 and since 01/01/2011' will never be returned. the condition "Age.Prs_Dte between (Sysdate - 61) and Trunc (Sysdate, 'RRRR') ' is a more narrow condition that" Age.Prs_Dte between (Sysdate - 90) and Sysdate. Any SYSDATE value which translates by "Age.Prs_Dte between (Sysdate - 61) and Trunc (Sysdate, 'RRRR')" TRUE will as a result in the previous state, "Age.Prs_Dte between (Sysdate - 90) and Sysdate" being TRUE.

    If you need an expression BOX which will return sometimes 'less than 90 and since 01/01/2011', then do not use the one you posted. I don't know what you should use, because I do not understand your business needs. Post some sample data (CREATE TABLE and INSERT statements for a table with the columns prs_dte and sys_date), display the results you want sample data and explain how you get these results from these data, and someone will help you write a CASE expression that produces these results.

    Only use "date3 BETWEEN date1 AND date2" when date1 and date3 are always midnight. 
    

    I really did not understand what point completely.

    Sorry, I wasn't very clear. What I meant is that a lot of people make mistakes in using BETWEEN with DATEs, because they forget that all DATEs include hours, minutes, and seconds. If the hours, the mionutes and seconds all arrive at 0, then BETWEEN works the way they expect. When the hours, the minutes and seconds are not all 0, then these people are often confused.
    For example, in my time zone is currently about 17:58 September 23, 2011, so at present, nor this condition:

    SYSDATE  BETWEEN  TO_DATE ( 'JAN/01/2011', 'MON/DD/YYYY')
             AND      TO_DATE ( 'SEP/23/2011', 'MON/DD/YYYY')
    

    or this condition

    SYSDATE  BETWEEN  TO_DATE ( 'SEP/24/2011', 'MON/DD/YYYY')
             AND      TO_DATE ( 'DEC/31/2011', 'MON/DD/YYYY')
    

    is set to TRUE. Which can be confusing.
    If change us one to tell us "SEP/24"instead of "SEPT. 23." /', then it would be a point in time (that is midnight on 24 September) when the above two conditions were TRUE. Which can be confusing.
    Similarly, if we leave "SEP/23 ' in the first condition and change the second condition to say" SEP/23 ' rather than ' SEP/24 ', then there is also a point in time when both conditions are TRUE.»»» Which can be confusing.
    I admit it is subtle and can be difficult to understand if you don't really understand how work DATEs.
    If all goes well, it is easy to understand: don't use not BETWEEN with DATEs. The results are not what you expect if you don't really understand how work DATEs.

  • Form of customization: how to access the data of another form

    Hi all

    I need to customize the form end job and for a condition, I need to use the Probation_Period_End_Date (: ASSGT.) D_DATE_PROBATION_END) which is available in the form of assignment.

    Any idea how can I use this whiout any function of writing database?


    Thank you
    Avinash

    Hello Avinash,

    You can use the query directly in the customization of form as Conditions
    Select date_probation_end in the per_assignments_x where person_id =: PERIOD_OF_SERVICE. PERSON_ID

    and put in your state of health as if you want to post Probation date of end is less then sysdate then in State in as.

    TRUNC (SYSDATE)< (select="" trunc(date_probation_end)="" from="" per_assignments_x="" where="" person_id="">
    define the error message.

    Kind regards
    Saurabh

  • How to calculate cumulative data

    Hello
    I need output like this.


    Percent frequency percent Cumulative Cumulative frequency
    4468 0.91 0.91 4468
    21092 4.31 25560 5.23
    57818 11.82 83378 17.05

    I use Oracle 9i.
    My data of output like that and I need to write the query for 3 columns (frequency, percent, the cumulative frequency and cumulative percentage)

    1: the formula for the frequency column data is the sum of (dd + cc + mc_cc_mc).
    1: the formula for the percentage column data is (frequency/amount of cumulative frequency) * 100
    2: is the formula for the cumulative frequency column data (data of the cumulative frequency column of)
    3: is the formula for the cumulative percentage column data (data for the cumulative percentage column of)

    What should be the analytical function and how to write the query. Please find the sample of data and table script.

    CREATE TABLE all_lony)
    CampNO varchar2 (20).
    DD INTEGER,
    CC INTEGER,
    MC, INTEGER,
    cc_mc INTEGER
    );

    insert into all_lony (campno, dd, cc, mc, cc_mc)
    values (36,156,1320,445,2547);

    insert into all_lony (campno, dd, cc, mc, cc_mc)
    values (40,233,19711,263,885);
    =============
    Please find my query below

    SELECT campno
    || ','
    || DM
    || ','
    || CC
    || ','
    || MC
    || ','
    || cc_mc
    || ','
    || frequency
    || ','
    || by
    ||','
    || cumulative_fr
    ||','
    || AMOUNT (per) OVER (ORDER BY by LINES UNBOUNDED PRECEDING)

    FROM (SELECT campno q3.campno, q3.dm, q3.cc, q3.mc, q3.cc_mc,
    Q3. Frequency, q3.cumulative_fr,
    (q3. Frequency / SUM (q3.cumulative_fr)) * 100
    (Q2.campno SELECT campno, SUM (q2.dm) dm, SUM (q2.cc) cc,)
    SUM (q2.mc) mc, SUM (q2.cc_mc) cc_mc,
    (SUM (NVL (q2.dm, 0)))
    + NVL (q2.cc, 0)
    + NVL (q2.mc, 0)
    + NVL (q2.cc_mc, 0)
    )
    ) the frequency,.
    SUM (SUM (NVL (q2.dm, 0)))
    + NVL (q2.cc, 0)
    + NVL (q2.mc, 0)
    + NVL (q2.cc_mc, 0)
    )
    ) ON (ORDER OF the SOMME (NVL (q2.dm, 0)))
    + NVL (q2.cc, 0)
    + NVL (q2.mc, 0)
    + NVL (q2.cc_mc, 0)
    () THE UNBOUNDED PRECEDING LINES)
    cumulative_fr
    of all_lony
    Q2 Q1)
    GROUP BY q3.campno) q3
    GROUP BY campno, dm, cc, mc, cc_mc, frequency, cumulative_fr)

    Just check the query and let me know

    Hello

    Everything is given.
    Each column formula is given...thriugh this we can get all the required result.
    The query is not working properly thats the issue and thats why i posted this whole senario.
    

    I don't think that everything is given. You gave:

    select * from all_lony
    
    CAMPNO  DD       CC      MC      CC_MC
    36     156     1320     445     2547
    40     233     19711     263     885
    

    And you want to:

    Frequency  Percent  Cumulative Frequency   Cumulative percent
    4468       0.91     4468                   0.91
    21092      4.31     25560                  5.23
    57818      11.82    83378                  17.05
    

    First of all, you want 3 rows where we start with 2. I don't see anyway to generate the 3rd rank on 2 data.
    With the following simple query, I get the frequency and the Cumulative_freqency.

    select
      campno
      ,dd + cc + mc + cc_mc Frequency
      ,sum(dd + cc + mc + cc_mc ) over (order by campno) Cumulative_freqency
    
    from
      all_lony
    
    CAMPNO               FREQUENCY CUMULATIVE_FREQENCY
    -------------------- --------- -------------------
    36                        4468                4468
    40                       21092               25560 
    

    As you can see that your formula for the frequency is not give the result that you want.
    1: the formula for the frequency column data is the sum of (dd + cc + mc_cc_mc).
    This should be:
    1: the formula for the frequency column data is dd + cc + mc_cc_mc.

    Now the percentage formula
    1: the formula for the percentage column data is (frequency/amount of cumulative frequency) * 100

    I think you mean
    1: the formula for the percentage column data is (frequency / cumulative frequency) * 100

    But this does not 0.91 or 4.31 as in your result set.

    Then please explain in a simple furmula with the sample values you have given the way in which we can calculate the percentage column.
    The cumulative percentage column follows out of the percentage column.

    Then explain how to get the 3rd rank.

    Kind regards

    Peter

  • How can I get data from child form

    Hello.
    IM an adapter to get the data in the main form based on the Instance of coding key.
    using this piece of code, I can get all the data in the main form.

    String response = "";
    formData tcResultSet = formIntf.getProcessFormData (Key);

    * if (formData.getTotalRowCount ()! = 0) {*}
    String [] columns = formData.getColumnNames ();
    * for (int i = 0; i < columns.length; i ++) {*}
    * response = response + columns [i] + '=' + formData.getStringValue (columns) + "\n";* ".
    *}*
    *}*

    Anyone know how to make data on child of forms?

    Thank you.

    Hello

    Try the following code:

    tcFormInstanceOperationsIntf tcforminstanceoperationsintf = apiFactory.getUtility ("Thor.API.Operations.tcFormInstanceOperationsIntf") (tcFormInstanceOperationsIntf);

    tcResultSet procChildFormDef = tcforminstanceoperationsintf.getChildFormDefinition (tcforminstanceoperationsintf.getProcessFormDefinitionKey (procInstKey), tcforminstanceoperationsintf.getProcessFormVersion (procInstKey));

    procChildFormDef.goToRow (0);

    long procChildInstKey = procChildFormDef.getLongValue ('Structure Utility.Child Tables.Child Key');

    tcChildResultSet = tcforminstanceoperationsintf.getProcessFormChildData (procChildInstKey, procInstKey);

    From there, you will get the child form result for the data set, you can loop and get the data you want.

    Hope this helps.

    Thank you best regards &,.
    Ankit

  • How to save the data in a form called?

    Hi all.

    I have two froms.like FORM A and FORM b.

    I have a button on the FORM B.

    When I click on this button, FORM B and FORM data should be store in the database...

    I wrote something like this in the form B

    when_button_pressed->

    commit_form;

    go_form ("c\user\babu\FORM A.fmx");

    commit;

    Here, my problem is when I click on save button only saved FORM B, FORM A not memorizing the data in the database.

    Please help me and tell me where the error...

    Post edited by: N.B.Babu

    I guess that the modules form a calls B with OPEN_FORM module (..., SESSION), IE. Module B works in the new session of database

    (by the way, the database connection is the same, because the connection to a database can go several database sessions).

    Your code cannot save the data in the two sessions of database:

    commit_form; -This saves the data only from module B (because A module work in diferent database session).

    go_form ("c\user\babu\FORM A.fmx");  -Now you in module A.

    commit; -This has no effect, you are now on the module to a.

    Kind regards

    Zlatko

  • How to calculate the date from sysdate


    I try to get 12/09/2009-12:51:30 by subtracting the current date to sysdate.

    I can get with this year, but I don't know how I can get to the date and the month preceding.

    () Choose add_months (sysdate-36() of double) = 12/09/2010

    Planned result 12/09/2010 13:23:30

    Thank you for the help

    I'm assuming that time is fixed if it is to see the example below.

    SQL > select add_months (to_date (to_char(sysdate,'dd-mon-yyy') |)) (("" 12:51:30 ',' dd-MON-yyy hh: mi: ss AM "), - 36) prior_date
    2 double;

    PRIOR_DATE
    -----------------------
    12 - Oct - 2010 12:51:30

    SQL >

  • How to calculate the date interval

    Hi Experts,

    I'm looking for a way to calculate the interval between two dates. And get the result to the format "dd.mm.yyyy hh24:mi:ss.
    select  sysdate - to_date('1.1.2000 12:00:00','dd.mm.yyyy hh24:mi:ss') from dual
    Best practices for a problem like this?

    Best regards
    Igor
    select trunc( months_between( day2, day1 ) / 12 ) years
         , mod( trunc( months_between( day2, day1 ) ), 12 ) months
         , numtodsinterval( day2 - add_months( day1, trunc( months_between( day2, day1 ) ) ), 'DAY' ) rest
    from ( select to_date( '19-01-1979', 'dd-mm-yyyy' ) day1, sysdate day2 from dual )
    
  • How to calculate the data according to the fiscal

    I want to dispaly the result for  the accounting year from April to March for any accounting year (Accounting year is from April to March). 
    I have a table INVOICE. 
    
    CREATE TABLE INVOICE
    (
      IN_NO       NUMBER,
      IN_DT       DATE,
      IN_DETAILS  VARCHAR2(20 BYTE)
    )
    
    I want to calculate display the result for accounting year from April 2010 to March 2011, and from April 2011 to MArch 2012.
    What statement should i use to filter the data as above ?
    
    Sanjay

    user12957777 wrote:

    I want to dispaly the result for  the accounting year from April to March for any accounting year (Accounting year is from April to March).
    I have a table INVOICE. 
    
    CREATE TABLE INVOICE
    (
    IN_NO       NUMBER,
    IN_DT       DATE,
    IN_DETAILS  VARCHAR2(20 BYTE)
    )
    
    I want to calculate display the result for accounting year from April 2010 to March 2011, and from April 2011 to MArch 2012.
    What statement should i use to filter the data as above ?
    
    Sanjay
    

    You should now learn to use correctly

     tags
    
    select to_char(add_months(in_dt,-3),'YYYY') FISCAL_YEAR FROM INVOICE;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
    
  • How to calculate the date fields while excluding Saturday and Sunday

    Hi, I use Jdeveloper 11.1.3.4

    I have an Oracle database and creates a table called holiday with 3 attributes:


    user (VARCHAR)

    (early)

    end (date)


    The idea is that you subtract the finish from the beginning and get a number of vacation days used. The thing is that the sum should exclude Saturday and Sunday.

    Any way to do it?
    /* Formatted on 6/1/2011 7:57:32 AM (QP5 v5.149.1003.31008) */
    WITH t AS (  SELECT id,
                        MAX (strt) strt,
                        MAX (finish) finish,
                        SUM (dys) days_off
                   FROM (SELECT id,
                                strt,
                                finish,
                                CASE
                                   WHEN TO_CHAR (dy, 'day') LIKE 'saturday%' THEN 0
                                   WHEN TO_CHAR (dy, 'day') LIKE 'sunday%' THEN 0
                                   ELSE 1
                                END
                                   dys
                           FROM vacations
                         MODEL
                            PARTITION BY (ID id)
                            DIMENSION BY (0 d)
                            MEASURES (POCETAK strt, KRAJ finish, POCETAK dy)
                            RULES
                               (dy [FOR d FROM 1 TO finish[0] - strt[0] INCREMENT 1] =
                                     (NVL (dy[CV () - 1], dy[CV ()]) + 1)))
               GROUP BY id
               ORDER BY id)
    SELECT t.id,
           t.strt,
           t.finish,
           t.days_off,
           vacations.korisnik,
           SUM (
              CASE
                 WHEN finish < TO_DATE ('01/07/2011', 'dd/mm/yyyy') THEN days_off
                 ELSE 0
              END)
           OVER (PARTITION BY vacations.korisnik ORDER BY t.id)
              this_years_running_total,
           SUM (
              CASE
                 WHEN finish < TO_DATE ('01/07/2011', 'dd/mm/yyyy') THEN days_off
                 ELSE 0
              END)
           OVER (PARTITION BY vacations.korisnik)
              this_years_grand_total,
           SUM (
              CASE
                 WHEN finish >= TO_DATE ('01/07/2011', 'dd/mm/yyyy')
                 THEN
                    days_off
                 ELSE
                    0
              END)
           OVER (PARTITION BY vacations.korisnik ORDER BY t.id)
              next_years_running_total,
           SUM (
              CASE
                 WHEN finish >= TO_DATE ('01/07/2011', 'dd/mm/yyyy')
                 THEN
                    days_off
                 ELSE
                    0
              END)
           OVER (PARTITION BY vacations.korisnik)
              next_years_grand_total
      FROM t, vacations
     WHERE t.id = vacations.id
    
    id                    strt               finish        daysoff          korisnik    thisyrruntot  thisyrtot   netyrruntot    nextyrtotal
    1     5/25/2011     5/31/2011     5     Kantardzic     5     22     0     26
    2     6/6/2011     6/13/2011     6     Kantardzic     11     22     0     26
    5     6/1/2011     7/6/2011     26     Kantardzic     11     22     26     26
    6     6/16/2011     6/30/2011     11     Kantardzic     22     22     26     26
    
  • How to calculate both date diff?

    What is the function similar to the POET? as datediff = date1 - date2 statement SQL Oracle db,
    I tried to use less, it wasn't works, POET does not support at least two directly?
    Thank you very much!

    Ishmael

    You can use the timestampdiff function. TimestampDiff function returns the total number of intervals specified between two timestamps.

    Syntax:

    TimestampDiff (interval, time stamp-expression1, expression2-timestamp)

    example TimestampDiff (SQL_TSI_DAY, date1, date2) returns the number of days between date1 and date2.

    The specified interval. Valid values are:

    SQL_TSI_SECOND
    SQL_TSI_MINUTE
    SQL_TSI_HOUR
    SQL_TSI_DAY
    SQL_TSI_WEEK
    SQL_TSI_MONTH
    SQL_TSI_QUARTER
    SQL_TSI_YEAR

  • How to add the date felxfiled in OFA

    How to add the date felxfiled in OFA

    Hi gurus,

    How to add a date in the form OFA field. I tried but no optin schedule it. I need to add the calendar options before the flexfiled.

    Concerning

    Hello

    Allocate FND_STANDARD_DATE segment value your FDF everywhere where you want to see the calendar on the page of the OFA.

    Let me know if you need more help on this.

    Kind regards

    Hemant

  • On the forms send us and receive in return, data in the form of fields will be not print.  We can view the data, but the fields to print Virgin.  How can I fix it?

    On the forms send us and receive in return, data in the form of fields will be not print.  We can view the data, but the fields to print Virgin.  How can I fix it?

    OK, it's different. These text boxes are (at least engineering point of view) not considered form data, they are annotations (or markup). On your print dialogue box, you will see a group of "Comments & Form". Make sure that the first control is set to "Document and annotations:

    After this change, you should see the markup of your impressions.

  • How do you export data in form of Acrobat Reader?

    I have Adobe Acrobat Reader XI (last version) with Windows 8.1.  I would like to know how to export data from a form field so another can import it.

    Hey astromath,

    This can be done using the software Adobe Acrobat and Reader not.

    You can export the data as a file FDF, and then re-import the TOT TOT another file (don't forget that PDF forms must have the same field names).

    To export the data to a FDF file in Acrobat, choose forms > manage form data > export data and save it to your computer and do the same thing to import it into the new PDF.

    Hope it will be useful to you.

    Kind regards

    Ana Maria

  • How to calculate the sum of two digital form fields based on the selection of the checkbox.

    I have a form in Acrobat Pro who needs a custom calculation. How to calculate the sum of two digital form fields based on a selection of the checkbox. I have three number fields. Field-A and B are simple one or two digits. Field-C is the sum, or the total field. I want to field-C have a control box which, when turned on and off, just gives a. gives the sum of A + B

    _ Field - 2

    _ Field - A 4

    [check] _ _ field - 6 C

    [disabled] _ _ field - 2 C

    Thank you

    The custom field C calculation script could be:

    (function () {
    
        // Get the values of the text fields, as numbers
        var v1 = +getField("A").value;
        var v2 = +getField("B").value;
    
        // Set this field's value based on the state of the check box named "CB"
        if (getField("CB").value !== "Off") {
            event.value = v1 + v2;
        } else {
            event.value = v1;
        }
    
    })();
    

    Replace 'A', 'B', and 'CB' with the real names of the fields.

Maybe you are looking for