Problem with Date calc

I am trying to get this FormCalc calculation to work:

Date2Num (form1. Page1_SF. EffectDates.endDate, ' DD/MM/YYYY') - Date2Num (form1. Page1_SF. EffectDates.startDate, "DD/MM/YYYY")

Evently, I will divide by 7 to get the number of weeks, but the initial calculation won't work after the dates entered.

Can you tell me what the problem with my forumula?

Thank you.

Odd. Something strange on the Date2Num format. I changed them in the calculation for "YYYY-MM-DD" and it works. Note that this is the calculation of the number of days elapsed.

If (HasValue (form1. Page1_SF. EffectDates.endDate) & HasValue (form1. Page1_SF. EffectDates.startDate)) then
$.rawValue = Date2Num (form1. Page1_SF. EffectDates.endDate.rawValue, 'YYYY-MM-DD') - Date2Num (form1. Page1_SF. EffectDates.startDate.rawValue, "YYYY-MM-DD")
on the other
$.rawValue = null
endif
Steve

Tags: Adobe LiveCycle

Similar Questions

  • Structure of the event: problem with data transfer

    Hello everyone,

    for three days I'm troubleshooting an issue in LabView with the event structures. I really hope someone can help here, because I can't find anything on the entire WEB.

    I had six groups of equal to a VI entry, each containing five checks enum (among others) where the user can specify some configuration of measurement data. I want the program to do is: to recognize if a any of these enum values has been changed and if yes, then submit the values containing the cluster in a subvi then calculates the wiring and affect the material of the ports. In addition, i need to submit the number of the enum element that was changed, so the program is able to clear the user input in the case of a breach (e.g. If the user sets two entries of enum control 1 meter and 2 Group 1 and then tries to set a third counter of entry to port 3, the program displays a message and deletes third entry as the number of entries of counter is limited to 2 per cluster).

    To resolve this problem, I used a structure of the event with 6 x 5 cases (change of enum value 1 Group 1 Group 1 enum value 2 change... and so on until the change in the value enum 5 Group 6).

    The problem is that if the user changes a value, the event structure reacts and performs the proper case; However VALUES of the cluster, the user changed are not subject to the SECOND time that an event occurs. It is a kind of a situation, "n-1". For example, if all five controls Enum of Group 1 are 'disabled' first and the user sets enum 3 of 'Meter entry', the structure of the event runs but submits the values previous to the Subvi (all enums 'Disabled'). When the user makes the second change, say that enum SWITCH1 to "Analog Input", the structure of the event is running again and passes the values of the FIRST user to the Subvi editing, then the Subvi gets data "enum 3 meter inlet and all other disabled enumerations.

    In easier words: if I have new values on my cluster "Kanal 1" (left side of the screenshot) and run the structure of the event, on the right side to "Kanal 1" indicator, I get the previous values (n-1).

    The structure of my event is in a while loop. If I create a timeout every 10 ms, and a loop of 250 ms the waiting time, I got the 80% chance that the recent changes are transferred to the Subvi correctly, in other cases I have a delay of the 1 step as described above. It seems to be directly based on the time that I specify the while to wait - but I can't explain it and I cannot accept a less than 100% chance to transfer the correct data, nor can I accept delays of a few seconds for each loop run. If I indicate timeout (infinite) get delayed 1-1 step values in all cases.

    When I specify cases of event to react on "all items value change" of the structure of the event behaves properly - but then I can't handle indicate which element has changed, as the CtlRef of output in case of a structure does not specify "enum 1, enum 2..." but only "Group 1".

    Does anyone have a solution to this? It is certainly a problem with the structure of the event, but I can't understand what to change.

    Thank you much in advance,

    Mr. Boiger

    This is because the terminal is read until the structure of the event runs.   Terminal is read, the event structure is waiting for an event.  The change in value.  Business events are running, but the value is the old value.

    Put the terminal inside the event.

    Or, you can display the connector called "New value" on the side left (stretching down from the border of the node 'CtrRef').  Use a wire one to come.

  • Problem with date and time

    HP Elite m9498d, Windows Vista 32-bit. Battery change, but the time and date again goes back to January 2002?

    Then, it might be a problem with the BIOS itself. Try to update the BIOS which for sure should solve the problem.

  • Problems with date calculation

    I have a java (and much more far vb) background and it seems that I'm really dependent functions for date calculations.  I'm trying to do a few things, but have not been able to accomplish them.

    I do not have

    Calendar.add()
    

    I briefly contemplated an add function by converting into long then do the calculation and returns a new calendar object, but the problems with this approach comes flourishes as soon as I started.  Just trying to find out if a date was yesterday was me banging my head against the wall.

    Any help please?

    I wrote this, but I don't know if there is a simpler method, go to this issue the wrong way, etc.

    public static boolean isYesterday(Calendar c) {
        Calendar today = Calendar.getInstance();
        int newDay = today.get(Calendar.DAY_OF_MONTH);
        if (newDay == 1) { //get last day of previous month
            int newMonth = today.get(Calendar.MONTH);
            int newYear = today.get(Calendar.YEAR);
            /* If jan 1, get dec of last year */
            if (newMonth == 0) { //Java Calendar.MONTH is zero-based
                newMonth = 11;
                newYear -= 1;
            today.set(Calendar.YEAR, newYear);
            }
            today.set(Calendar.MONTH, newMonth);
            newDay = DateTimeUtilities.getNumberOfDaysInMonth(newMonth, newYear);
        } else {
            newDay -= 1;
        }
        today.set(Calendar.DAY_OF_MONTH, newDay);
        return DateTimeUtilities.isSameDate(today.getTime().getTime(), c.getTime().getTime());
    }
    

    'convert to tz to the device.

    I recommend that stick you with using UTC for everything.  If you want to display to the user, then a DateField will convert the hour UTC to local time.  SImpleDateFormat.formatLocal will also print you long time UTC to local time.  So I recommend that you do not have to convert once at the local level.

    Remember that System.currentTimeMillis () is time not UTC/GMT.

    Of course, that's a good advice or not depends on your app.

    I'm not aware of any third-party code that helps, I reinvented wheels square to all my treatment to date.  But I never really looked at.

    About your code, assuming that c calendar uses the local time zone, so I think that the code works.

  • TO_CHAR fucntion problem with dates.

    Hi all

    I tested the following problem with 10g and 11g databases, and the problem is the same.

    create table aa (a date);
      insert into aa values('23-Mar-2014');
     commit;
    

    now the following query gives no results

    select count(*) from aa
    where to_char(a,'dd-Mon-yyyy') >='23-MAR-2014' and to_char(a,'dd-Mon-yyyy') <='23-Apr-2014';
    COUNT(*)
    ----------
     0
    

    and the following query gives the results

    select count(*) from aa
    where a>='23-Mar-2014' and a<='23-Apr-2014'
    
    COUNT(*)
    ----------
      1
    

    Why?

    We need the to_char working for our criteria of search dot net application.

    kindly guide us.

    Thank you

    You're hurting. Why convert a date into a string of characters and try to compare it to another string? This is false.

    Insert into aa values('23-Mar-2014');

    should be

    insert into aa values (to_date (March 23, 2014 ',' MON-DD-YYYY "");)

    and your selection should be:

    Select count (*) in aa

    where a > = to_date (March 23, 2014 ',' MON-DD-YYYY') and to_date (April 23, 2014 ',' MON-DD-YYYY "")

  • Problem with date settings

    Hi all. I have the problem with the Sub statement


    SELECT THE DOUBLE TO_DATE(:P_DATE,'DD/MM/YY')

    it get me ' 10 / 04/2012 '

    but I want 10/04/12 not as above.

    I saw that DD/MM/YY not like 'DD/MM/YYYY' still it gives me 10/04/2012 why can someone explain?

    Kind regards
    Uraja

    To_Date will always give you the output date format-based nls...

    Instead, you can try

    SELECT to_char (TO_DATE(:P_DATE,'DD/MM/YY'), ' DD/MM/YY') FROM DUAL;

    or replace nls_Date_format jj/mm/aa

  • problems with DATE

    Hello

    I have the following plsql:
    DECLARE
       TYPE record_t
       IS
          RECORD (
             col_1    DATE,
             col_2   VARCHAR2 (7),
             col_3    VARCHAR2 (1)
          );
    
       l_record    record_t;
       l_ref_cur   dyn_fetch.ref_cur_t;
    BEGIN
       l_ref_cur := helper.ref_cur;
    
       LOOP
          FETCH l_ref_cur INTO   l_record;
    
          EXIT WHEN l_ref_cur%NOTFOUND;
    
          ELSIF (LOWER (l_record.col_3) = 'd')
          THEN
             DELETE FROM  table_new
                   WHERE   MY_DATE = TO_DATE (l_record.col_1);
    
             DBMS_OUTPUT.put_line ('here it is: ' || l_record.col_1);
          END IF;
       END LOOP;
    
       CLOSE l_ref_cur;
    END;
    So, the problem is, that 'L_RECORD. COL_1"returns dates in the form: jj. MM YY

    It works very well with most of the files, but it does not find the file with date = 15.08.1930. Then I l_record.col_1 = 15.08.30! Maybe the problem is that oracle is not sure if she should return * 1930 or 2030 *...

    So, how can I solve this problem, I want to return the l_record.col_1 * 15.08.1930 *, NOT 15.08.30!

    Should I change the definition of the record_t type?

    Thank you!

    Your record definition defines COL_1 as a date, so there is not need to convert a date value in this column.

    Remove the TO_DATE() function inside the loop.

  • Problem with date comparison

    I have a problem with the TO_YMINTERVAL('10-00') function.


    Thank you
    Bachan.

    Published by: bah on March 23, 2010 14:47

    Please do not double post.
    Problem with TO_YMINTERVAL('10-00') function.

    Stick to your original thread, as others have already tried to help you.
    Start a new thread on the same topic is a waiste of time, as already provided entries are lost to other readers...

  • Problem with data services blackBerry Smartphones

    I want to use internet on my phone that by wifi, so obviosly I disabled data on implemented mobile network services. Problem is when I'm home or anywhere where I can connect to a wifi network, I get a message saying that there is no problem, and if it persists, I must contact my provider. I'm something wrong, is the solution?

    For some strange reason, you can now navigate with your data disabled Services.  It is a new feature in OS 7 (or 7.1, I don't remember which operating system, it has been introduced).  There was a time where you need to Data Services is enabled for surfing, even just with a Wi - Fi.

    However, I am happy that things are working for you now.

  • Facing problem with date and time.

    * - Original title - BIOS

    Mr President.

    I have Compaq CQ2100IL Desktop pc for awhile I was faced with the problem of the date and time, so I posted this question to Microsoft, so they gave me a solution change my CMOS battery, so I did it, but despite this I get this error again then I tried and got answer to update my BIOS , I tried to find a version update on the HP site but did not find, so please help me in this matter.

    Hi Vikas,

    You can contact HP here: http://h10025.www1.hp.com/ewfrf/wc/contacthp?cc=us&dlc=en&lc=en&os=4062&product=3890751&sw_lang=

    Warning in the BIOS: BIOS change / semiconductor (CMOS) to complementary metal oxide settings can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the configuration of the BIOS/CMOS settings can be solved. Changes to settings are at your own risk.

    Let us know if you need assistance with any windows problem. We will be happy to help you.

  • Problem with data type 'Date' in Hyperion Planning V11.1.2.2

    Hello

    I created members with the date data type. However when I save the date, it disappears or comes up with a random date? One has encountered such a problem before?

    If so can you share the fix.

    Thanks in advance for your help.

    See you soon,.

    XXX

    Hello

    This problem is related to you not having is not a coherent framework for your type of date entry.

    So, go to the administration of the application and define the date format DD/MM/YYYY in the application settings and display options, under current default application settings. Then after doing that as a user, go to user preferences and display options and the date format, select the same. Or delete automatically detect them.

    I've seen this behavior if you detect automatically on the user's preferences

    Thank you

    Anthony

  • Problem with date in the canonical format

    Hi all

    I have a test with the sql data source:
    Select sysdate double;

    The result is the BI Publisher
    <ROWSET>
      <ROW>
        <SYSDATE>2009-05-07T14:56:19.000+02:00</SYSDATE>
      </ROW>
    </ROWSET>
    that is the date and time for the selection. It displays 14:56:19 as time what exactly is the time that I started the selection.

    Now, I create a template in Word only display the sysdate with parameters field:
    Type: Date
    Format: dd-MMM-yyyy hh: mm:

    and the result is (copied from the PDF):

    07-May-2009 * 12: 56:19 *.

    Any ideas how to solve this problem? It seems to me that the section '+ 02:00 ' to canonical format is interpreted as a modifier in the model...

    Thanks in advance :)
    Wolfgang

    Published by: Wolfgang on 07.05.2009 15:19

    You must set the timezome as

    America/New_York

    By default, it will be GMT.

    The area in which you are?

    There is the function, where you can specify the zone and get this time exactly.

  • problem with date functions

    Hello

    I have a table with 2 columns. first column is the date and time. Second, this is my case.

    I want an auto-calcul, count the number of records I have today.

    What should I do? I tried the = countif ($A, today (()), does not work.

    help someone. million thanks

    You can do something like this:

    = COUNTIF (table 1::A, ' > = '& (today), table 1::A,' ')<>

    Today() gives the string date / time of the last midnight.  Today () + 1 gives at midnight tonight.  The COUNTIF counts all entries on or after last midnight and before the next midnight (which is the start of tomorrow).

    SG

  • Problem with date & time - guard back to 2009

    The date and time on my laptop keeps returning to a 2009 a whenever I have shut down my computer. This has only started happening recently and I don't know what started to happen.  Is there a simple solution to do this, in addition to having to put every time that I re - start.

    > The date and time on my laptop keeps returning to a 2009 a whenever I have shut down my computer.

    This indicates that your CMOS battery is NOT. It's time to replace it.

    What is CMOS battery:

    http://www.computer-hardware-explained.com/CMOS-battery.html

    How to replace the CMOS battery
    http://www.computerhope.com/issues/ch000239.htm

    * ATTENTION: then the battery itself is very good cheap, be careful if you decide to replace yourself.
    It is better to have another friend who knows also computer be with you together.

    The safest way is to pay the Department store. But it will cost you.
    Your call.

  • Problems with data conversion

    Hi all

    I'm doing an A - D conversion. Conversion table is given in attachment, as well as the file vi. I got three 8-bit during serial communication data and join them to form a 24-bit number (I mention this so there is no question why mets implement entry like that). As you can see in the table of conversion without exit number must be greater than Vref, however in this implementation, I get a flow of 2 * Vref.

    Can someone please help me find the error.

    Darko

    The conversion formula is implemented for bipolar data while your VI U32. You cannot represent negative numbers with U32 (unsigned integer).

    Lynn

Maybe you are looking for