Another Date Calculation Question.

Hi All,
OK, this is a continuation from here: http://forums.adobe.com/thread/906583  Basically, I need to change the form a little and therefore need a continuation of that threads result.
Short version - I need to take a future date which is calculated by taking a result of a drop down (0-13) and using this script finding a day in the futue:
var f = this.getField("BILLINGCYCLEDATE");
var g1 = this.getField("DAYS");
var g = g1.value
var today = new Date();
var add = today.valueOf();
add +=1000 * 60 * 60 * 24 * g;
var future = new Date(add);
f.value = util.printd("mm/dd/yyy", future);
Basically it adds a number of days to today and giving a result.
What I need to do is take that result, add another number of days (0-13 again) to give a new date.... and I am struggling to get a result at the moment.
So here is a real workd scenario:
How many days from today will the contract start?  (option 0-13 days) = RESULT A.
How many days from RESULT-A will first payment be due (option 0-13) = RESULT B.
Does that make sense?
Thanks for any help you might be able to provide.
Ant

Hi Mate,
OK, this gave me a result... but it was a result of X number of days from today (rather than from the result of "RESULT-A"
Here is what I placed in as my script.
var f = this.getField("DirectDebit_Start");
var g1 = this.getField("Daysuntilstart");
var g = g1.value
var n1=this.getField("MembershipDaysTillBilling");
var n=n1.value
var today = new Date();
var add = today.valueOf();
add+=1000*60*60*24*g*n
var future = new Date(add);
f.value = util.printd("dd mmmm yyyy", future);
Any thoughts on where I am going wrong?  I have tried doing a few different things but I either get no result or I get X days from today's date.
Thanks for your help!

Similar Messages

  • Another Data Merge question...

    Thanks, SRiegel, now that I’ve added the apostrophe in the title of the photo column, the Data Merge box DOES indicate photo. The problem is, when I do the Data Merge, it says the photos can’t be found. Here’s an example of how I have the photos listed:
    U:\MyPictures\employees3\smithjohn.psd
    Thank You

    Is that path correct? Can you place that image outside of data merge into another document, and doe it say that's the path?

  • Another DATE/TIME question

    HI all
    I am trying to INSERT INTO TABLE a date and time into one line..
    excerpt looks like
    CREATE TABLE Test
    (Submit DATE );
    INSERT INTO Test
    VALUES(to_date('2001-01-02 22:23:00','yyyy-mm-ss hh24:mi:ss'));
    I get an error message that says it's missing a comma (and I can't figure out WHERE). I have tried quotes in different places etc...Is it not possible to put a date and a time in the same slot?
    Thanks in advance

    Try this...
    SQL> create table mytest (submitted date);
    Table created.
    SQL> desc mytest
    Name Null? Type
    SUBMITTED DATE
    SQL> insert into mytest
    2 (SUBMITTED)
    3 values
    4 (to_date('2001-01-02 22:23:00','yyyy-mm-dd hh24:mi:ss'));
    1 row created.
    SQL> select * from mytest;
    SUBMITTED
    02-JAN-01
    HI all
    I am trying to INSERT INTO TABLE a date and time into one line..
    excerpt looks like
    CREATE TABLE Test
    (Submit DATE );
    INSERT INTO Test
    VALUES(to_date('2001-01-02 22:23:00','yyyy-mm-ss hh24:mi:ss'));
    I get an error message that says it's missing a comma (and I can't figure out WHERE). I have tried quotes in different places etc...Is it not possible to put a date and a time in the same slot?
    Thanks in advance

  • Adding Date/Time Field + X Number of Days - Basic Calculation Question

    I am assuming this is a basic calculation question. New to Adobe LiveCycle Forms.
    I have a simple form containing a table. The table appears as such:
    Text
    Formatted as Date/Time Fields
    Header 3
    Monday
    user wil choose the beginning date (Date/Time) this is DateTimeField1
    Tuesday
    this should calculate DateTimeField1 + 1
    Wednesday
    this should calculate DateTimeField1 + 2
    Thursday
    this should calculate DateTimeField1 + 3
    Friday
    this should calculate DateTimeField1 + 4
    Saturday
    this should calculate DateTimeField1 + 5
    Sunday
    this should calculate DateTimeField1 + 6
    Calculations are performed after the date is chosen for Monday. My mind tells me the simple calculation of DateTimeField1 + 1 is not going to work (and in fact doesn't!) as it needs to change Monday to a number first. I saw on another thread the following:
    Num2Date(Date2Num(Date(DateTimeField1), "DD.MM.YYYY")+7, "DD.MM.YYYY")
    Thought this was going to get me close. No cigars though!
    Any quick help is greatly appreciated. And since I am new to this, details about what needs to be changed would be great too!
    Thanks

    Here an addition for you date field.
    This FormCalc script in the exit:Event will check it the selected date is on a monday.
    If not it will go the days back until the last monday.
    var Selection = Date2Num($.formattedValue, DateFmt(2))
    var WeekDay = Num2Date(Selection, "E")
    var NewDate
    if (WeekDay eq 1) then
              NewDate = Selection - 6
    elseif (WeekDay eq 3) then
              NewDate = Selection - 1
    elseif (WeekDay eq 4) then
              NewDate = Selection - 2
    elseif (WeekDay eq 5) then
              NewDate = Selection - 3
    elseif (WeekDay eq 6) then
              NewDate = Selection - 4
    elseif (WeekDay eq 7) then
              NewDate = Selection - 5
    else
              NewDate = Selection
    endif
    $ = Num2Date(NewDate, "EEE DD.MM.YYYY")
    Hope this helps, too.

  • Date Calculation in BEx

    Hello All,
    In my report, User wants to see a day counter which is the dfference of a date (date coming from cube) and Current date. For current date  we are using 0f_aday sap exit. How we can we acheive this, does it involve any User exits at the back end or can I use a calculated keyfigure to find the difference between these two dates.
    Please reply to this as it is very Urgent Issue
    thank you

    HI AL,
    Thanks for the udpate. But I believe we can update any thread if its related with the same subject if its less than 3 years. Is it not right ? I have a mail in my inbox, from some moderator confirming the same. That is the reason I have updated this thread...as its related to the same question and this thread is created n 2011.
    Anyway, thanks for the answer. I will change the dimension to date and calculate the difference from the 2 variables.
    Reg another doubt, from the below link...
    https://docs.google.com/viewer?a=v&q=cache:YQS2jPhWysAJ:www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/705734f2-4e85-2e10-2ebf-891d0110de74%3FQuickLink%3Dindex%26overridelayout%3Dtrue+&hl=en&gl=au&pid=bl&srcid=ADGEESjL8dx81tAAJNL0Ln4c2MW4k3yZRDNFsop1pptOc3bQf1xU0Le9e3loFsZXJi5rWuYt3j7yoStGMktsL5XEdV9T3ONzdKay0x5yrIbaUBB3Dpz1Fr6xuggf_IZX-S0Q4WONpBhN&sig=AHIEtbTZfXXLN4gZCsw7qpZXgrkjeCYLcA
    what is the field used for Interval ( from, to , range) . You have missed my other question, why am I getting X below the result while doing the date calculation . I mean I am getting the result, but below every row, there is a X . Any ideas ?
    Thanks,
    DR

  • How is delivery date calculated

    How can anyone please explain how delivery date is calculated using forward and backward scheduling
    I want to have it broken down into the following steps
    for eg for delivery date calculation following dates are used
    Material Availabilty Date
    Material Staging Date
    Pick/pack time
    Transportation PLanning date
    Loading date
    Goods issue date
    Transit Date
    Delivery Date
    Can some one please give me an example and explain wht these dates are
    for eg customer needs delivery date on  11/20/2008
    how would the system cacluate whether it can meet the delivery date using backward scheduling
    and if it doesnt meet how does the system do the forward scheduling
    also i am not clear with the following dates
    material avaialibilty date
    material staging date
    transportation date
    can some one please explain me all this in detail
    Also i have another question at the sales order creation when is shipping point and route determined
    coz based on the ATP check only material avaialabilty date is determined and if we have a bacjground job running every 1 hours for atp then immediately when we create a sales order is a route and shipping point determined (just before we save the sales order)
    Let me be more clear
    Suppose customer representative recevies a order on the phone
    he enters sold to party, ship to party ,PO number,delivery date and material number and then hits enter
    so at tht time the shipping point and route is determined ?
    also when an atp check runs and if the delivery date is not met then the system will propose a new delivery date but if we have a different route configured say for eg overnight so we can meet the delivery date and we want to change this route to overnight what must we do?
    should we change the shipping condition in the header?
    I am not very sure about the process can you please also explain me this in detail?
    Thanks

    Hi there,
    When a sales order is logged & the user enters the requested delivery date, system 1st does the backward scheduling date. Pla note that the factory calender mentioned in the shipping point & route plays a crutial role in defining the working days & confirmed delivery date.
    For eg:  Customer has raised an order on 11/15 & requests delivery on 11/20/2008.
    the following times are important in delivery scheduling.
    Transit time: maintained in route
    Loading time maintained in the shipping point
    Transportation planing time maintained in the transportation planning point.
    pick pack time maintained in the shipping point.
    Material availability time maintained in MM02 --> MRP screens. This is the time that the material can be manufactured (for inhouse producted items) or external processing time (for externallly procured materials like TAS items).
    From the requested delivery date 11/20 system does the backward scheduling & determines the following dates:
    Goods issue date, loading date, pick pack date, transportation planning date & material availability date.
    Time between:
    goods issue date - reqested delivery date: transit time
    Goods issue date - loading date: loading time
    transportation planning date - pick pack date: picking pack time
    Material availability date - transportation date: transportation planning time.
    Consider that the factory calender has all days of the week as working dates (to make it simple to explain). Also transit time is 3 days, loading time is 1 day,pick pack time is 1 day, material availability time is 3 days.
    From 11/20 ussing backward scheduling system determines the following dates:
    Goods issue date: 11/17
    Loading date: 11/16
    Pick pack date: 11/15
    System will check if material is available on the 11/15 to start pick / pack. If it is available then system will confirm the reqested delivery date. Else it will check when the material is available. For eg basing on the MRP settings mnaterial is available only on 11/18. So from 18th system does forward scheduling & redetermines all the dates. So pick / pack date is 11/18. Loading date is 11/19, goods issue date is 11/20 & possible delivery date is 11/23. So system will confirm the delivery date on 11/23. This is when complete delivery is required. If partial delivery is allowed, then system will check how much quantity is available on 11/15. Accordingly it will give 2 delivery dates.
    In the above example include teh factory calender which will have 5 day week with Fri & Sat as holidays. Accordingly dates will change.
    Here replenishment lead time also plays an imp role. Pls refer http://help.sap.com/erp2005_ehp_03/helpdata/EN/6b/2785347860ea35e10000009b38f83b/frameset.htm for further information
    Regards,
    Sivanand

  • Baseline date calculation in Invoice verification (MIRO)

    Dear experts,
    I need to set baseline date after 40 days from document date in MIRO.
    Baseline date calculation of "Terms of Payment" in IMG has two parameters:
      ・Fixed day
      ・Additional months
    We cannot set 40 days in these parameters.
    Can anybody tell me how to set baseline date not month but date(not fixed day) ?
    Please advise me on the settings SPRO>MM>Purchasing>Vendor Master>Define terms of Payment.
    Thanks & Regards
    Ken

    Hi,
    You can't do this.
    The baseline date is the date on which the calculations are made.
    So if you have 40 days to pay, this will be 40 days from the baseline date.
    This will either be the document date or another date, but you can't (in standard SAP) have the baseline date as "X" days after "Y".
    So the baseline date is the date of an event (e.g. the date that the Invoice was posted) not a calculation.
    Is it possible that you have misunderstood the use of this date?
    If you just want to ensure that the payment date is 40 days after invoice recipt, then set you just have to enter the number of days in the payment terms and the baseline date stays as the invoice date (etc.)
    Steve B

  • EA 3.1 - Data Node Questions

    I have the following questions regarding the Data and Model Nodes
    1. Is it possible to define one table/view to be used in building the model(s) and a different table/view for testing the model.
    2. If we use the same table/view for the build and testing, can we see what data is being used for the build and what data is used for the testing
    3. For question 2, can we extact the data into another table etc

    Hi Brendan,
    See answers below.
    Thanks, Mark
    1. Is it possible to define one table/view to be used in building the model(s) and a different table/view for testing the model.
    Answer:
    Yes. Just connect another data source to the Classification or Regression Build Node.
    The second DS node has a link labeled as Test. If you want to swap the build and test data source, then select the Build Node, right click to bring up the node context menu and select "Swap Data Sources".
    2. If we use the same table/view for the build and testing, can we see what data is being used for the build and what data is used for the testing.
    Answer:
    No. The split data are temporary views. If you want to control exactly what data is used, then use your own test and build data source nodes.
    3. For question 2, can we extact the data into another table etc
    Answer:
    See answer to question 2.

  • UCCX 9 Search by first 4 letters and another data

    Good afternoon everyone
    Could you please advise me on this question?   I need to search a person's information by using first 4 of ID number, first 3 of area code and another data such as his/ her birthday...
    My script is....
    1.  Ask a caller to enter first 4 digit of ID  (Complete ID number is 10digits or longer)
    2.  Ask a caller to enter first 3 numbers of area code
    3.  then, ask his/her to enter complete birthday (MM/DD/YYYY)
    4.  With those information, I need database to search person's recent activity data
    I tired for first 4 digit ID search as    SELECT * From VW_Database WHERE CustomeNumb LIKE 'CustomerNumber%'      in DB Read Field Selection.   However, it comes back as no data found...   It does not look like taking wild card (%) 
    Please advise how i can use wildcards with this data search....
    Thank you ,
    Nana

    Thank you so much for super quick reply.
    My team member Left function   LEFT (CsuomterNum, 4) = $CustomerNumber and yes,  it worked
    Thank YOU for your help as usual!!!!
    nana

  • Date calculations based on working days

    I need to add date calculations to a worksheet to show the time elapsed between two actions.
    Just a straightforward subtraction works fine, but what I really need to be able to do is calculate the number of working days between the two point (as something taking 5 days over Christmas with the 2 bank holidays is different equivalent to something taking 3 days in a normal week)
    At the moment I'm exporting the data into excel for analysis of this, but would really like to be able to do it in Disco so that the end users can go straight to the report using viewer, rather than having to do the conversion for them.
    Is this possible?
    Cheers

    Hi,
    Every thing is possible, the Q is how complicated is it....
    My suggestion is to create a table with all the dates of the non-working days for ex:
    create a table with all the MON-THURSDAYS, union to this table the holidays you know of such as christmas and so on.
    After getting this table you can create a function that returns the number of working days between 1 date to another by subtracting the days exists in this table.
    I started with that, you are more then welcome to get ahead with it and let us know what happened...
    create table holiday
    D_date date,
    d_day varchar2(20)
    create or replace procedure holiday_proc is
    d_date date;
    begin
    d_date := trunc(sysdate);
    while d_date<'01-jan-2010'
    loop
    if to_char(trunc(d_date),'Day') not in ('Saturday ','Sunday ') then
    INSERT INTO Holiday (d_date,d_day)
    (select trunc(d_date),to_char(trunc(d_date),'Day') from dual);
    end if;
    d_date := d_date+1;
    end loop;
    commit;
    end holiday_proc;

  • The DATA CAP MEGA THREAD....post data cap questions or comments here.

    In the interest of keeping things orderly....This is the DATA CAP MEGA THREAD....post data cap questions or comments here.
    Please keep it civil.
    Comcast is testing usage plans (AKA "data caps") in certain markets.
    The markets that are currently testing usage plans are:
    Nashville, Tennessee market: 300 GB per month and additional gigabytes in increments/blocks ( e.g., $10.00 per 50 GB ). 
    Tucson, Arizona market: Economy Plus through Performance tiers receive 300 GB. Those customers subscribed to the Blast! Internet tier receive 350 GB; Extreme 50 customers receive 450 GB; Extreme 105 customers receive 600 GB. Additional gigabytes in increments/blocks of 50 GB for $10.00 each in the event the customer exceeds their included data amount. 
    Huntsville and Mobile, Alabama; Atlanta, Augusta and Savannah, Georgia; Central Kentucky; Maine; Jackson, Mississippi; Knoxville and Memphis, Tennessee and Charleston, South Carolina: 300 GB per month and additional gigabytes in increments/blocks ( e.g., $10.00 per 50 GB ) Economy Plus customers have the option of enrolling in the Flexible-Data plan.
    Fresno, California, Economy Plus customers also have the option of enrolling in the Flexible-Data plan.
    - If you live outside of these markets you ARE NOT currently subject to a data plan.
    - Comcast DOES NOT THROTTLE your speed if you exceed your usage limits.
    - You can check out the Data Usage Plan FAQ for more information.
     

    I just got a call today that I reached my 300GB limit for the month.  I called and got a pretty rude response from the security and data usage department.  The guy told me in so many words that if I do not like or agree with the policy that I should feel free to find another service provider.!!! I tried to explain that we watch Netflix and XFinity on-demand alot and I was told that that can not be anywhere close to the data usage. I checked my router and watching a "super HD, dolby 5.1" TV show on Netflix will average about 5-6 GB per hour (1.6MB/s) ... sp this means that I can only watch no more than 1-2 Super HD TV shows a day via Netflix before I run out of my data usage.    This seems a bit redicilous doesn't it? Maybe the TV ads about the higher speed than the competition should be accompanied with "as long as you don't use it too often"   Not a good experience ... 

  • Calculations question and how to display on right

    The auto-generated totals can be displayed in the far right column. How can I display a custom calculation in the far right column instead of between columns?
    Also, I have a crosstab report with horizontal axis of date and vertical axis of group/name/type. I need to get a percentage of (all dates of one type for one name) over (all dates of all types for one name). I also need to get a percentage of (all dates of one type for one group) over (all dates of all types for one group) either by duplicating the first calculation or further grouping the results. I need these to be total calculations not by-date calculations, any help would be greatly appreciated.

    Hi, thanks all your reply.
    You may find "points_to_bar_graph.vi" from this website, I find it by this way.
    I will ask a stupid question: I don't have any photo processing software, how can I save the vi into a picture format?
    So here I just paste it into word document.
    Attachments:
    question.doc ‏520 KB
    points_to_bar_graph.vi ‏62 KB

  • ITunes search api releaseDate - is there another date property somewhere too?

    Hi guys
    Are there two release dates in the API? I notice that releaseDate doesn't always match up with what is displayed in iTunes.
    For example, an api search in the Great Britain store for Dreadlock Holiday by 10CC, looking at the 'Bloody Tourists' album shows the release date as 2002-07-15T07:00:00Z, yet the store says Sep 1978 (the latter being correct).
    https://itunes.apple.com/search?term=dreadlock+holiday&country=GB
    Is there another date to access?

    I have the same question about the releaseDate.
    After investigation I found that lookup API always returns the date of the very first application version release.t
    For ex. if we have next versions:
    1.0.4.8 released 2013-03-20
    1.3.0.1 released 2014-12-31
    2.1.0.0 released 2015-04-20
    Lookup will return us release date 2013-03-20 for each new release.
    Is there some way to get the releaseDate of a specific version?
    Thanks,
    Misha

  • Letter of Credit in Payment Due Date Calculation

    Dear All,
    I meet a case as following:
    Sales Order A with 80% Letter of Credit
    (L/C) payment (set in header condition) and 20% downpayment, with Payment Terms: L/C payment due
    date is before a special date.
    Question 1: If downpayment has cleared, whether user can see that a
    record of downpayment paid in a Sales Order under SAP standard design?
    Question 2: whether SAP standard desgin/configuration can set L/C
    payment due date by a payment term? note: L/C is flexible depends on
    different Sales Order?
    Thanks for all your helps!

    Did you find a solution to this?
    Is it possible to separate down-payment from rest of sales order - so Letter of Credit is only for the sales value minus down- payment?
    SO value 1 Mio USD
    Down-payment .2 Mio USD
    LOC value >> .8 Mio USD?
    Cheers
    Hein

  • Schedule Line Delivery Date Calculation with Transportation Scheduling

    Hi All,
    We are currently running into a problem where our Sales Order Schedule Line delivery dates are being pushed out too far into the future - because of the Calendar being used to determine the transit time.
    We have 'Delivery Scheduling' and 'Transportation Scheduling' activated for our Sales Document type
    We have Routes that are configured with a 'Transit Time' and a 'Factory Calendar'
    Order Scenario:
    'Factory Calendar' assigned to our 'Route' is setup with only one 'Workday' in a given week e.g. Wednesday
    Our 'Route' has a Transit Time of 2 days
    We create a Sales Order on Monday for a Material that is available in our Plant
    The 'Goods Issue' date is being determined correctly for the next Workday - being Wednesday
    The 'Delivery Date' is extending out over 15 days (2 Wednesdays into the future) - since it is working on 'Calendar Days' and not 'Actual Days'
    Does anyone know of a way (config or other) to only influence the 'Goods Issue' date with the 'Factory Calendar' assigned to the Route, and have the 'Delivery Date' calculated using the Transit Time on the Route and 'Actual Days' rather than Calendar days?
    All help greatly appreciated.
    Thanks,
    Ravelle<i></i>

    Hi Pathik,
    Thanks for your reply.  I have already maintained the Calendars I'm using for this business process in <SCAL> - same as <OY05>. 
    The problem I'm having though is that by assigning a Calendar directly to my route (which I doing to influence the goods issue date - using a 1 Working Day Calendar) it is also taking precedence in determining the Transit time - which in this case I don't want, as I want my Transit time to be determined using a 5 Working Day Calendar.
    I don't think this problem has a config option as a work around...I think the only possibility in this case is a development to achieve the results we need.
    Thanks,
    Ravelle

Maybe you are looking for

  • Lightroom photo galleries and their swf files

    I have a question about using the photo galleries that lightroom exports in flash catalyst.  what I'm trying to do is use multiple photo galleries for different states in my flash application (www.negativeselfimage.com is the site).  flash catalyst a

  • SQL Server Licensing for BI

    Hi! I have a some questions regarding BI in the Standard Edition of SQL Server. 1. If a customer wants to have BI only in Excel and not in Sharepoint, will he/she make it with SQL Server Standard edition? 2. Can the user still use PowerPivot in Excel

  • Seething with venom for Adobe's garbage CS4 suite, ignoring of Mac platform

    I just purchased a Macbook Pro in November after 15 yrs on Windows. In all my years, I've never had a fraction of the problems with Adobe products that I have since I got this Mac. Is Adobe simply not that INTERESTED in making their products perform

  • Encore DVD to Encore CS3

    I have a DVD that was created with the Premiere 2.0 and then into Encore DVD. Now I need to make this same DVD into a BluRay. I have the new Encore CS3 but it is not letting me open the file. Any hope of this working? I also I cannot open the old Pre

  • I need Photoshop cc iso file

    hi i need Photoshop cc iso file from where i can download becoz i am unable to download  from adobe application manager frequent error coming Thank in advance Phani