Php Date - 7 Days

0 views
Skip to first unread message

Juliane Bari

unread,
Aug 4, 2024, 7:56:42 PM8/4/24
to poetajagerb
NoteWEEKDAY returns a 0 for Sunday up to a 6 on Saturday. So, this formula adds 4 days for a start date on Thursday, Friday or Saturday, 3 Days on a Sunday and 2 days on Monday, Tuesday or Wednesday.

Hi @Phil_Lauer - you are quite correct, the formula for any number of days added would be slightly different and require a modified formula - but structurally the formulae would be similar and would just need to account for the different additions for different starting days (Date 1). There are some simple cases as well - for example to add 5 working days you would always add 7 days - as with any multiple of 5 actually.


As far as I can see, it is only possible to set the due date based on the trigger time, start date of the task, creation time, and due date (i.e. number of days AFTER the due date of the trigger task).


Big, big fan of this idea. If other organizations are anything like mine, subtasks are those small steps you take to fulfilling the overall parent task. This certainly seems like the most logical use case of subtasks, at least.


100% want this feature. I set up task templates for content (like blog posts) that have several sub-tasks that are standard (such as create draft, reviews, post, etc) and having these sub-tasks preset with standard lead times would be SUPER helpful. That way our calendar view of the main task will always show the final due date, but authors also automatically know when their drafts are due based on the publish date.


It is not possible to set a date X days before the due date. While it is possible to specify X days after the start date, that does not enable the ability to automatically set due dates of subtasks to a certain number of days before the due date if task durations are not always the same.


Yes, please add the ability to set subtask due dates in templates relative to the parent task due date! Without this feature, it actually takes me longer to set up tasks and projects in Asana than it did before our org started paying for this project management tool.


I agree, this was possible if only briefly because I setup a number of rules using this feature that are suddenly broken and setting up subtask due dates AFTER the task due date. This worked fine for several months, no idea why it was removed but now multiple automations that were key to our workflow are broken.


Setting up subtask due dates to be relative PRIOR to the task due date is a requirement for us to use automation and rules properly for my work. There is honestly no point to having automated timing on sub tasks without it.


Unfortunately, HubSpot currently doesn't support adding a number of days to a date property. Calculcation properties (which would be included in your Professional subscription) don't allow adding a number of days to a date. I would expect this to be added soon but it's not available yet.


For that kind of calculation, a third-party solution would be needed, e.g. Zapier. You would trigger a Zapier workflow of an event in HubSpot (in your case the fact that a deal was created) and then execute the calculation outside of HubSpot. Other users have described this workaround in a lot of detail, see for example this explanation by @Arlene. (Thank you for that!)


Another option would be a workflow that enrolls deals based on Create date, waits for a delay of 3 days and then date stamps your Close date. The downside of this solution is that the Close date will only be available after the 3 day wait time.


The 'Task start date' column and 'Task end date' column are both date columns, and i have tried checking and unchecking the box to restrict to dates only in the column properties and get the same issues.


I'm trying include a date range with counting the number of applicants within various depts, in certain date ranges, but it's saying incorrect argument set. =COUNTIFS(DISTINCT([Name of Requestor]:[Name of Requestor], [Submission Date]:[Submission Date], AND(@cell > DATE (2023, 9, 30), @cell


The official government working week is Monday to Friday; 8 hours per day, except Friday which is 7 hours, and 39 hours in total per week. Official work hours run from 08:30 am to 05:30pm with 1 hour for lunch from 12:30pm to 01:30pm. On Friday, lunch hour runs from 2:00 am to 6:00 to allow Muslims attend to Friday prayers. Saturday and Sunday are public holidays. The private sector often follows different schedule with most of them often working on Saturdays.


When adding a rule to reset work due date, it would be helpful to auto factor in weekends. Ex. if it takes 3 business days for our QA team to test a process, and it is sent to them on Thursday or Friday, a 3 day window is shortened to 1-2 business days.


Does this work when the date you're using in the formula is not an @row cell but just a cell in the same column as the formula? I can't seem to get it to work. I am plugging in dates based on a list of items we have, all based on one date. I want to calculate working days, but I tried the formula listed earlier in this thread with no luck. Any ideas?


I get a positive integer from an input field and now I want to subtract this integer from the current date with +year. (People type in their age and I want to calculate and save their approximate birthday).


Heck, if lazy, just give us :negate on all data types where the operator is a null function for data types for which it does not make sense (those types being Things, texts, dates, date ranges and date intervals).


Are you after a yearly run or specifically a task that runs on March 27th in 2027? If you wanted to run a schedule on March 27th every year you could use something like 0 0 27 3 *. This site can be handy for working out cron expressions:


Once it has started you can put anything you want after it, In theory you could just set the Due date in the Todoist node to the expression used in the Set node then you can just have the 2 Cron and Todoist nodes.


Yes, I tried this, it somehow works for me. I also excluded the last 1 day to make sure it will not mix the data of two days and then make the data misleading. my concern for this feature is that if I display the filter on the sheet, the UI is not so straightforward as the usual one (the data is equal to xyz), do you know how to improve this? thanks


LV_end and LV_start are local variables with the two dates, Date.parse() converts each date to milliseconds since 1970, which is converted to number of days since 1970 by the division. The subtraction gives the difference in days. The 1 is added to so the span goes from the morning of the first day to the night of the last day, rather than just morning to morning. So Jan 1 through Jan 31 gives us 31 days instead of 30. (This may or may not be desired.)


What just worked for me was to format the cells before entering the dates. When I typed in the dates first, and then applied the formats over top of them, I got #VALUE! from the formula. Format then data entry gave me 644.


Fixed the calculation, and changed/split the formula to hopefully be a bit clearer. First I determine the number of weekends that must be jumped over:

RoundDown((thisRow.[Duration (in business days)] + thisRow.[Start Date].Weekday() - 3) / 5)


This might be the stupidest question, but how does one make this conditional? ie. the start date is based on the current date/date of record entry. I can only seem to get this formula to work if the state in the formula is static.


You can now securely access your retirement check details anytime, anywhere, and on any device. With our new myCalPERS Pay Warrant app, you can access your current and past retirement checks through your mobile device at the click of a button. Access our myCalPERS Pay Warrant App Instructions (PDF) to learn how.


Benefits are paid at the beginning of the month for the previous month's benefits. For tax reasons, your December retirement check is always dated the first day of the new year. The State Controller's Office issues checks and determines mailing dates. If you have direct deposit, contact your financial institution to see when funds are placed in your account.


Students enrolled in mini-courses with start and end dates that differ from the regular 5-week and 10-week summer sessions should refer to their class syllabus and/or contact their instructor to verify the last day to drop a course without a grade.


Last day to add a course without permission of instructor. MyPack Portal closes for adds at 11:59 p.m. After this day, please contact the instructor in order to add a class. Once an instructor has approved your enrollment, they will work with the department directly to enroll you in the course. Instructors with questions regarding the enrollment process should speak with their department.

3a8082e126
Reply all
Reply to author
Forward
0 new messages