Using a Date field to calculate another date equalling + 6 'Working Days'

I am trying to provide a schedule return date based upon an Issued Date value
The problem is that I only want the estimated return date value to include working days (6 to be precise), which are Monday to Friday.
Any assistance in disregarding weekend days from my results would be greatly appreciated

Try this
DateTimevar IssueDate:={IssueDate field here};
DateTimevar Scheduledate;
Numbervar WeekEnds;
Scheduledate:=DateAdd('d',6,IssueDate);
Weekends:= DateDiff('WW',IssueDat,Scheduledate,CrSaturday)+DateDiff('WW',IssueDat,Scheduledate,CrSunday);
Scheduledate:=Dateadd('d',Weekends,Scheduledate);
IF DAYOFWEEK( Scheduledate) = CrSaturday THEN
   Scheduledate:= DATEADD('d', 2, Scheduledate);
IF DAYOFWEEK( Scheduledate) = CrSunday THEN
   Scheduledate:= DATEADD('d', 1, Scheduledate);
Scheduledate
Jyothi
Edited by: Jyothi Yepuri on Sep 3, 2009 6:55 AM
Edited by: Jyothi Yepuri on Sep 3, 2009 7:07 AM

Similar Messages

  • In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms

    In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms.
    How can i do this?

    Hi,
    You can select the Payment Term at PO Header Level.
    When you book an invoice, that Payment Term will automatically defaulted to Invoice.
    You can define Payment Term in AP.
    Payment terms have one or more payment terms lines, each of which creates one scheduled payment. Each payment terms line and each corresponding scheduled  payment has a due date or a discount date based on either a specific day of a month, such as the 15th of the month, or a number of days added to your terms date, such as 14 days after the terms date.
    Payment Terms (Oracle Payables Help)

  • Date Field Input Box in data  table does not provide date picker???

    hello everybody,
    In my JSF page i have a data table in which i have a input text field of date type. my problem is for the input box date picker is not available. though i can have date picker for a date filed outside the datatable. another problem is for the date filed validation in the browser is not available too. so how can i get the helper calender and browser validation? plz help. ASAP
    with regards,
    sailajoy
    Edited by: sailajoy on Jan 7, 2009 12:42 PM

    You are absolutely correct Sir.
    I am using IBM Websphere for developing JSF and the component is
    <h:inputText id="txtBirthDt" size="11">
    <f:convertDateTime pattern="dd/MM/yyyy" /><hx:inputHelperDatePicker />          
    <hx:inputHelperAssist validation="true" errorClass="inputText_Error" errorAction="selected"/>
    <hx:validateDateTimeRange maximum="#{now}" /></h:inputText>
    Both the helper calender and the validation part for the date field is not working if it is included in data table. Please Help.

  • How to create a date field which is 16 months before today(current day)

    Hallo,
    I made a report and i want to set date limits. My data contains a date field so in record selection filter i like to set that the date field is between date1 and date2.
    As date2 i set and as date1 i what to set a date which is 16 months before today(first of that month)
    For example today is 08/05/2010 so,
    date2 = 08/05/2010(August 2010)  and  date1 = 05/01/2009(May 2009)
    Any idea?

    Ian,
    Here's a little formula for getting to the first of the month, that's easier than what you've been using...
    To find the beginning of the current month
    DateAdd("m", DateDiff("m", #1/1/1900#, CurrentDate), #1/1/1900#)
    ... or to find the begining of the month. 16 months ago
    DateAdd("m", DateDiff("m", #1/1/1900#, CurrentDate) - 16, #1/1/1900#)
    Jason

  • Unable to display the Content of a data file from within another data file in Oracle webcenter portal.

    We have a Content Presenter taskflow. This task flow is added to a jspx page. The taskflow fetches the content from the contributor data file. The contributor data file is having a WYSIWYG editor. The content of the WYSIWYG editor is being displayed correctly through the task flow.
    We have some links in the WYSIWYG editor. These links again point to some data files. When we click on these links from within the portal, then we are getting a blank page(the url of this blank page is: http://localhost:7101/eWSIBPortal/faces/oracle/webcenter/sitestructure/render.jspx?datasource=UCM%23dDocName%3AWSIB_ARTICLE) and not displaying the content of the data file that we are pointing to from the WYSIWYG editor.
    We want to display the content of these data files(which we have pointed from WYSIWYG editor) in-line within the portal.
    Please help us to resolve this issue and let us know if any information is required from our end.

    Thanks for reply. However, can I use XSQL to dump the formated text to a file? or just can display to client through web browsers?

  • Display difference of a Date field and today's date in the query

    hi experts,
    I have a query which has a date field called 'Effective Date.'
    I just need to a add a column in the query that shows me the diffenrence between 'Effective Date' and the date the query is run (key date).
    Do i need a custom exit to accomplish this?
    The new column can either display the number days elapsed from 'Effective Date' to the key date or it can also display Number of Years/ Months / days.
    Any ideas?
    Thanks,

    Check this if it helps:
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html

  • Is there a way to calculate a date field based on aother date field in sharepoint list?

    In a SharePoint list, I have a 'Start of Use Date' and need to ensure the 'Review Date' is no more than 14 months after the 'Start of Use Date', but can't figure out the formula.  Can you help?

    You can cast the field values in the SPListItem to DateTime objects and call the AddMonths(int) function to see if the two are more than 14 months apart. For instance:
    DateTime startOfUseDate = (DateTime) item["Start of Use Date"];
    DateTime reviewDate = (DateTime) item["Review Date"];
    if (startOfUseDate.AddMonths(14) >= reviewDate)
    // Review Date IS NOT more than 14 months after Start of Use Date
    else
    // Review Date IS more than 14 months after Start of Use Date
    Danny Jessee
    MCPD - SharePoint Developer 2010
    MCTS - SharePoint 2010, Configuring
    dannyjessee.com/blog

  • Adding new date field to already loaded data target.

    Hi,
        we have a cube containing date feild such as 0CALMONTH. the data is being loaded to the cube. now they have added new date feild (0FISCYEAR). how to get data to this feild. there is no data coming from source system for this feild. please can any one tell me how to include this feild and load data into it.
    with regards,
    sreekanth.

    Sreekanth,
       If Record creation date is the right field for deriving fiscal year, Why cant you derive the year from the date...by using automatioc time conversion...?? In update rules...??
      For exising data, you can do loop back to populate the data. see the below doc, for more info:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f421c86c-0801-0010-e88c-a07ccdc69601
    Hope it Helps
    Srini
    Message was edited by: Srini

  • Change date field to a default date

    Hello,
    my requirement is such that i need to have a Valid to Date as 31/31/9999,
    I tried using left(systime(0),11) which will give me for eg, 12/10/2010, which i need to change to 31/31/9999
    How do i achieve this.
    thank you in advance

    Hi Abhishek,
    1stly, please correct your default date as there is no month of 31.. in MM/DD/YYYY.  Mention the exact default month are you looking for. I am assuming you want your Default date as 12/31/9999 for DateField.
    So if you want to populate DateField as 12/31/9999.. Create an assignment and assign DateField as assignment field and in expression write 3067670, it will populate automatically DateField as 31 Dec 9999 in your required format.
    Kindly mark thread as answered if it solves your query.
    Regards,
    Mandeep Saini

  • How to make users to select the date from calendar control my making the date field read only in date time control in external list in sharepoint 2010

    How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
    be done through sharepoint desginer / out of the box.
    thanks.

    Congratulate you got the solution by yourself. I am new to a
    WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
    calendar date selection did me a great favor. Cheers.

  • Disaggreation of one data set based on another data set

    Hi All,
    We are using Hierarchy based IP implementation using disaggregation option in the input ready query definition.
    We have a requirement as follows:
    1. Disaggregate version 200 based on Version 100.
    So, we have defined an input ready query, which would contain two columns one with the restriction tor the version 200 and one with restriction on version 100. We have hidden the column with restriction on version 100.
    Now, in the disaggregation properties of the column with restriction on version 200, we have turned on the disaggreation with reference to the column with restriction on version 100.
    When the query executed, it is doing always the equal distribution of the toal entered rather than doing the distribution as per the reference column.
    We can do work around using Distribution by reference, but not sure, whether the function can handle hierarchies. Best is to solve by the Input Ready Query disaggregation settings.
    Please let us know if you have any idea on how you have solved this issue, or is this a bug? I will openup a message with SAP after today.
    Thanks in advance,
    Best Regards,
    - Shashi

    Hi Shashi ,
    I have used this disaggregate property available in the query. It is working fine. In my case i am not hiding the reference key nor the dependent characteristics, so it is not giving any problem.
    There might be some problem in distribution if your reference data has some particular combinations of characteristics and in the planning layout you are trying to hide some of the characteristics that are present in your refernce data.
    Please check.
    For more details check this link:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/0c033316cd2bc4e10000000a114cbd/frameset.htm
    You can also try the planning function Distribution by reference, I am not sure whether it will work for hierarchy or not but you can give it a try.

  • When entering credit card details, is the date field for the start date or expiry date? [was: payment]

    I had my bank card accidently cancelled by my bank. I have entered the new card number into payment section and it is asking for a date. Is that date the time the card began or finishes - the section does not make is clear. Thanks

    I know of no banking or credit company on the planet that would ever ask or need to ask about the "beginning" date on a crdedit or debit card.
    I'd have no way of replying to such an absurd question if I were ever asked. 

  • DTP can Not extract data of date field from PSA to Target DSO

    Hi everyone.
    I enhanced several fields in datasource "2LIS_12_VCITM". that is date field "BLDAT" and another date type fields.
    The data of date type fields are extracted very well from datasource to PSA.
    But only field "BLDAT" among them are NOT extracted from PSA to target DSO.
    Another date type fields is good. but only "BLDAT" field is empty.
    I added "BLDAT" later than another date fields.
    Is that the reason??
    I don't know why.
    Let me know the solution. pls~~~~

    Hi,
    Try deleting and recreating the DTP and loading again.
    This solution refers to note 925941 and should be solved in SPS10.
    Best regards,
    Olav

  • Lowest value from 2 date fields combined

    Morning!
    Need a way to combine two separate date fields to determine the lowest combined value. The idea being finding an empno's overall seniority by looking at seniority date and birthdate, birthdate settles the tie in the event two empno's have the same seniority date.
    Can't find a way to do this using two date fields, only a single date field.
    I also need a way to continue finding the next empno in seniority after that, and so on. Need to increment some value or get the nextval somehow to find the next highest in seniority until the entire table has been reviewed.
    Thanks folks.

    Hey Thanks!!
    Table= Requests
    Fields: Empno, LastNme, FirstNme, Seniority_DT, Birth_DT,ReqDate,ReqTime,ChoiceNum
    Field values: vchar, vchar, vchar, date,date,date,date-time,vchar
    Examples in above order: 36525,smith,bob,08-jun-80,23-sep-60,15-mar-10,14:00,1
    The idea is that we assign (1) single day per month per employee of overtime based on seniority, and in case of a tie the birthdate settles seniority. Employees make more than one request per month so their empno appears in the table multiple times. Also a single empno can ask for one of two start times per requested day. At most, a single employee can make requests for any one of (12) days per month, on days Sun-Thu they can ask for one of (2) start times and on Fri-Sat they can ask for one of 3 start times. The "choice" field lets them indicate start time in order of preference.
    On each day on each start time, (2) different people work together, so for days 1-5 there are (2) shifts of (2) people each, total of (4) people assigned per day 1-5 and (6) people assigned on days 6-7.
    The needed output is that for Sunday-Thursday (2) people start at 14:00 and another (2) start at 18:00.
    On Friday-Saturday (2) people start at 14:00, (2) people start at 18:00 and (2) people start at 20:00.
    The idea for the report would be:
    Saturday, 13 March 2010
    1400 Bob Smith, Seniority Date
    1400 Ted Jones, Seniority Date
    1800 Tom Williams, Seniority Date
    1800 Karen Hu, Seniority Date
    2000 Mike Smith, Seniority Date
    2000 Jim Thomas, Seniority Date
    Sunday, 14 March 2010
    1400 Ed Davis, Seniority Date
    1400 Ron Thomas, Seniority Date
    1800 Tiger Woods, Seniority Date
    1800 Joe Davis, Seniority Date
    Each person may only work one day per month. In the event that there is a hole where no one put a request in, we need to go back over the remaining requests to fill them in. The original idea was to do this by:
    All choice #1 first, then start over looking at choice #2 and so on until all the days in the upcoming month are full.
    That's about the best I can explain it. The only way I can see is to do it by seniority and choice# then go around again if there's a hole. I just can't figure out how to look at both the seniority date and birthdate to ensure seniority nor can I figure the logic necessary to find the person, check if the spot is available and assign him or if not go to his next preference for that day and check if it's available and then continue to the next guy.
    It may have been simpler to explain the need in detail and ask that the structure and code be done from scratch but that's asking way too much so I thought I'd ask how to solve this problem and keep working on it from there.
    Thanks in advance again!
    ps... Haven't started the coding yet.... just need the code to accomplish finding seniority based on two date fields combined, then I'll start coding the entire thing.
    Edited by: user9320509 on Mar 10, 2010 5:33 AM

  • Can a user override the Current Date field?

    I have a simple form with a Current Date field.  Today's date is automatically populated in this field, but I would like to give users the option to enter a different date in the field.  There is a value called "Calculated - User Can Override" but this doesn't appear to work.

    When I first set up this field I used code I found on this forum that went in the 'layout:ready' area.  I've now removed it and used the code I found in your file in 'calculate'. The date field is now functioning properly.
    Thank you.

Maybe you are looking for

  • Acrobat 9 Pro has started showing incorrect black areas

    My Acrobat 9 Pro (Win 7) has started displaying black areas where normal content should be, The same PDF files display correctly with Adobe Reader. This same Acrobat worked fine for a long time, but a few months ago began displaying black instead of

  • Call a function in a package body

    I am new to Oralce, I am tried to call a function in an exiting package body using the package specification. function. But it failed , it says wrong numbers or types of parameters. I see the functions are defined in the package body with two definit

  • Display driver for IBM Thinkpad T60 on Windows 7

    Hi, I've just installed windows 7 on my T60. It seems that the display driver (Intel GMA 950) is not behaving the way it used to behave in windows XP. I tried to install everything I could find on the support web site. They say that the support for d

  • HP desktop crashed and will not start

    My HP computer (P7-1268C) crashed and will not restart. After trying everything I can think of, I pressed the start button once more and the color went from blue to orange and then blank again. The computer did not overheat as it is not even warm. Pl

  • Can u use Migration assistant from 10.5.8 to 10.7.2?

    My new MacPro is OS X 10.7.2 and my old one is 10.5.8.   Migration assistant does not work either from eithernet hookup or Firewire 800.   Is there a software patch or update for either box to allow migration from Old OsX 10.5.8 to 10.7.2?