COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

Date Due Calculation that Skips Weekends.

• Email
• Follow

```I currently have a calculation that determines when a project is due.  Is it
possible to have it skip weekends?  How can this be done.

My current calculation is:
Creation Date + daysLeftOpen + (Truncate(daysLeftOpen / 5, 0)) * 2

Thanks.
C

```
 0

See related articles to this posting

```You already have a field that calculates appointment date, so lets
assume its called "appointment_date". Add the following calculation
field (date result):

Case(
DayName( appointment_date ) = "Saturday", appointment_date + 2,
DayName ( appointment_date ) = "Sunday", appointment_date +1,
appointment_date
)

Adjust to suit your needs. As an example, if you prefer to schedule
Saturdays for Friday use appointment_date - 1.

You can substitute your existing formula where you see appointment_date
above, but might make things a little hard to read. If your working with
version 7 you can clean things up a bit using the Let function.

Michael Myett

Chris wrote:
> I currently have a calculation that determines when a project is due.  Is it
> possible to have it skip weekends?  How can this be done.
>
> My current calculation is:
> Creation Date + daysLeftOpen + (Truncate(daysLeftOpen / 5, 0)) * 2
>
> Thanks.
> C
>
>
```
 0

```Asuming that 1 workday from Saturday or Sunday is Tuesday, I think that
the following should do what you want.

start + workdays + Case(DayofWeek(start)=1,-1,
DayofWeek(start)=7,0,
0) +
Truncate((workdays+If(DayofWeek(start)=1 or
DayofWeek(start)=7,5,DayofWeek(start)-2))/5,0)*2

Where start is a date field and wordays is a number field.

Regards

Bob

Chris <ecbly@comcast.net> wrote:

> I currently have a calculation that determines when a project is due.  Is it
> possible to have it skip weekends?  How can this be done.
>
> My current calculation is:
> Creation Date + daysLeftOpen + (Truncate(daysLeftOpen / 5, 0)) * 2
>
> Thanks.
> C
```
 0

2 Replies
661 Views

Similar Articles

12/12/2013 1:03:55 AM
[PageSpeed]

Similar Artilces:

Re: Calculate business days between two dates, excluding weekends and US holidays #3
**************************************************************************= **************************************************************************= *** This=20email=20and=20any=20files=20transmitted=20with=20it=20are=20intende= d=20solely=20for=20the=20use=20of=20the=20individual=20or=20entity=20to=20= whom=20they=20are=20addressed. **************************************************************************= **************************************************************************= *** I=20have=20a=20macro=20that=20I=20developed=20for=20this.=20The=20only=20p= roviso=20is=20that=20you hav...

Date calculator, add or subtract days to or from a given date
Here is the code so far <form name="thisform"> <h3>Enter time to add to or subtract from:</h3> (If not entered, current time will be used)<br> Day: <input name="d1" alt="Day of month" size=3> Month: <input name="m1" alt="Month" size=3> Year: <input name="y1" alt="Year" size=5> (4 digits for year, e.g. 1950)<br> Hours: <input name="h1" alt="Hours" size=3> Minutes: <input name="i1" alt="Minutes" size=3> Seconds: <input na...

Date calculation
Hi there,I'm trying to build a function that can calculate, for a period until5 months, the specified date.For example, if i select today's date, 2nd October, the function mustreturn the following dates:November 6December 4January 1february 5I've check and in some month the date, is days, distance is 28 but inothers it is 35. What happens for this number variation? I've analyzedthe number of weeks in a month, the start and end weekday of the monthand the number of days in the month but i can't seem to discover whathappens to be 35 or 28.Any help will be usefull.Thanks in ad...

Hello, I am trying to calculate date like below: date +%Y%m%d -4 if the date 20051201, the result should be 20051127. Could you anyone help me with this issue please? How can I get the right result? Many thanks in advance On 22 Dec 2005 12:44:30 -0800, Herbert wrote: > Hello, > > I am trying to calculate date like below: > > date +%Y%m%d -4 > > if the date 20051201, the result should be 20051127. > > Could you anyone help me with this issue please? How can I get the > right result? would something like this work on your system? This is what happens on mine...

date calculation #5
Greetings! I=92ve been struggling with a date calculation for a few days. Any help or suggestion will be greatly appreciated! Here is what I have: the starting and ending dates of each promotion. What I need is: to check the promotion availability across months, and calculate points for each promotion each month. If the promotion ran through the whole month, that month gets 1 point. If the promotion was only valid for a partial month, the point gets prorated by the number of days of that month. For instance, if the promotion went from 10/1/2006 to 12/15/2006 (first example in the table below...

Date calculation #2
I am new to datebase program, and new to filemaker. Problem I have is as follow: I know date of arrival of certain goods. Warranty on the products is for example 18 months. If product arrrived on June 6, 2006; today is December 12, 2006; warranty is 18 months form June 6 2006. I want to know how much of warranty left from "todays" date. Todays date is current system date. tomislav <tomislav@htnet.hr> wrote: > I know date of arrival of certain goods. Warranty on the products is for > example 18 months. If product arrrived on June 6, 2006; today is > December 12,...

Timeline date calculations
Hi! I want to write a prolog application that calculates timelines of dates (date1 --- date2 --- date3 --- date4 --- ...) based on certain conditions like date1 is 30 days before date3 date2 is a given concrete date date3 is between date2 and date4 if date1 is on weekend, take the first day after weekend and so on. There are quite a lot of similar conditions. I do *not* need calendar arithmetic like "minus 20 workdays". Weekends and public holidays are just given negative conditions. Currently I'm thinking about implementing this via mapping calendar dates onto a timelin...

Calculating future dates
Hello, I'm new to Python so please bare with me... I need to calculate a date that is exactly 31 days from the current date in YYYY-MM-DD format. I know that date.today() returns the current date, but how can I add 31 days to this result? I'm sure this task is simple, but I haven't been able to figure it out. Thanks On Feb 1, 6:51 pm, "Toine" <bapo...@gmail.com> wrote: > Hello, > > I'm new to Python so please bare with me... > > I need to calculate a date that is exactly 31 days from the current > date in YYYY-MM-DD format. I know that dat...

calculating difference in date and times
Hi all: given: Obs1: dateVar1 and timeVar1 Obs2: dateVar2 and timeVar2 want: calculated difference between the observations given in hh:mm format (with a zero-fill) Any suggestions? ie: dateVar1 =3D 12/08//05, timeVar1 =3D 09:32 dateVar2 =3D 12/10/05, timeVar2 =3D 11:54 How do I get the difference with only hh:mm (something like 51:22)? > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Sheila Dayog > Sent: Thursday, December 08, 2005 5:58 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: calculating differe...

shell: calculate date in script
hello i got here a backupscript which makes a backup on the start ist shut remove a specially file in a 2 day old folder. this is the essential part of the script: #!/bin/sh # // day to a a=`date +%e` # // reverse interval days b=2 # // calculate folder name c=\$((\$a-\$b)) # // remove great file in folder rm -rf /mnt/sda3/backup_`date +%Y_%m`_\$c/file1.tar.bz2 # // create new backupfoldername mkdir /mnt/sda3/backup_`date +%Y_%m_%d` from the 12th to the 31 of the month this script works fine, but on the first days the calculation don't work right. is there a small way to solve this prob...

Re: date calculation #4
You can get "close" using WEEKDAY in the INTCK function. You will need to account for Holidays and Mondays when holidays are observed that is harder. There are some holiday calculators here on SAS-L if you search. INTCK example. 273 data _null_; 274 Earlydate = input('20061205',yymmdd10.); 275 Latedate = '13Dec06'd; 276 put (_all_) (=); 277 format EarlyDate Latedate date9.; 278 /* do i = EarlyDate to LateDate;*/ 279 /* put i=weekdate30.;*/ 280 /* end;*/ 281 Calendar = intck('DAY',Earlydate,Latedate); 282 Business = i...

Problem with date calculation in form
Hi Guys I have a form which must calc the difference between 2 date fields and return the result in a third field. I have the following code but it does not seem to work. Can anyone tell this total newbie where he is going wrong or suggest a more elegant way of doing this. thanks Pete <head><script> function doit(oForm, usrInp) { var one_day = 1000 * 60 * 60 * 24 ; var userDate = new Date(usrInp) var dueDate = new Date(usrInp) diff = dueDate - userDate oForm.diff.value = (diff/one_day) + ' days'; } //--> </script> </head> <body> <form ...

Year to date calculation in OLAP cube
I have fiscal year and fiscal month as dimensions in my OLAP cube as well as revenue as a measure. I would like to have a rolling total by fiscal year that calculates the year to date revenue. This is my current attempt (which does not work): Sum(YTD([Years].[FY]),[MEASURES].[Sum Revenue]), FORMAT_STRING="DOLLAR15." Any suggestions? Thanks! Carrie ...

Allowing Users To Modify A Date Calculation
What do you do if you need the option of the users to modify the field contents of a calculation field that is set up as a date? It seems that filemaker won't let you modify a caluculation field "Mad Dog" <mark_lees@byu.edu> wrote in message news:1107995911.916554.153290@o13g2000cwo.googlegroups.com... > What do you do if you need the option of the users to modify the field > contents of a calculation field that is set up as a date? > It seems that filemaker won't let you modify a caluculation field No, you modify one of the fields that the calculation is b...

Date calculations in multiple time zones
Hi, I`m trying to do date calculations in three types of time zones: local, GMT and specified. The issue I am facing is that I need to be able to specify a date in the proper time zone, and I`m having a heck of a time doing so. I have created a form where I use drop downs do specify year, month, date, hour, minute and seconds. When the form is loaded, the dropdowns have to display the proper values for the current time zone type. This code works (the one that syncs the dropdowns with a given time). When I submit my form, the data is sent to a Java back end. The back end will take the year, ...

confused on calculating date difference in days.
hello, I am strangely confused with a date calculation problem. the point is that I want to calculate difference in two dates in days. there are two aspects to this problem. firstly, I can't get a way to convert a string like "1/2/2005" in a genuan date object which is needed for calculation. now once this is done I will create a another date object with today = datetime.datetime.now() and then see the difference between this today and the string that I converted to date. now in the first place I can't recall how I can convert a string to a date. then now I don't know how...

calculating with dates in aix 5.x
dear aix gurus, i'd like to calculate with dates (counting days between two dates). do you have a simple -> how to... thanx alot tim tim moor wrote: > dear aix gurus, > i'd like to calculate with dates (counting days between two dates). do you > have a simple -> how to... > > thanx alot > tim Could you perhaps use the Julain date and work it out that way. Youd have to be careful when crossing over the years though - you'd prob have to do something like this for counting backwards across a year: julian date today - julian date last year + 365 Scott...

Re: Calculate prior dates value
Yes ,Yes a typo I guess... Thanks Toby --- toby dunn <tobydunn@hotmail.com> wrote: > Monal , > > I think you mean intnx not intck. > > > > Toby Dunn > > > > > > From: monal kohli <k_monal_99@YAHOO.COM> > Reply-To: monal kohli <k_monal_99@YAHOO.COM> > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: Calculate prior dates value > Date: Mon, 20 Mar 2006 07:58:11 -0800 > > INTCK should do it. > > HTH > Mona > > --- Tom.Salwa@GMAIL.COM wrote: > > > Hi, > > > > I have an interaction date ...

Calculating date six months ago
I have to calculate the date in MM-DD-YYYY format for a date that is exactly six months ago from the current date. What is an efficient way of doing this? So if my function receives a parameter 01-12-2005, it should return 07-12-2004. Any suggestions? hamstringaj@gmail.com wrote: > I have to calculate the date in MM-DD-YYYY format for a date that is > exactly six months ago from the current date. What is an efficient way > of doing this? > > So if my function receives a parameter 01-12-2005, it should return > 07-12-2004. > > Any suggestions? Create a java.util...

Ignore Daylight Savings in Date Calculations?
I have some date calculations that add a time span to a date. The problem is, when I add a time span that is a whole number of days to a date, the result can be +/- 1 hour due to daylight savings. Is there anyway to disable this? Joe Jax said the following on 9/19/2005 11:35 AM: > I have some date calculations that add a time span to a date. The problem > is, when I add a time span that is a whole number of days to a date, the > result can be +/- 1 hour due to daylight savings. Is there anyway to disable > this? Yes. Do your calculations using UTC or GMT. -- Randy co...