Dialogflow date-range values incorrect - dialogflow-es

Dialogflow V2 (beta) api.
Windows 10.
My intent uses the system date-period entity for this week and next week in the training phrases. When checking the values of startDate and endDate I find they are incorrect.
The dates for next week are for Monday this week to Sunday next week and the dates for this week are for Monday last week to today (Sunday)
They start on a Monday and finish on a Sunday. I checked the Date and Time settings in Windows and changed the first day of the week from Monday to Sunday and ran the same training phrase over 6 times and still got the same start and end dates. I have attached the screen shots for both and you can see that the day on the taskbar is Sunday. I would expect the startDate to be a Sunday irrespective of what the first day of the week was set to, otherwise the intent action would return the incorrect response giving a different user experience.

Related

Excel formula to determine shipping date

Due to production and shipping issues my job has created a report that has the customer's need by date and if a product has been completed or not. If an order is complete we need to determine when it will ship out and arrive to the customer. We have a set shipping schedule and orders get shipped on the truck right before the need by date. For example our truck leaves on Monday and Friday every week so if an order is complete and the need by date is on a Wednesday it will ship on Monday so any order with a need by date from Tuesday to Friday gets shipped the Monday before and any need by date from Saturday to Monday gets shipped on Friday. Now my questions is, is there a way to have a date range yield it's shipping date? Example when I'm writing this it's 5/11/2022 so if I have completed orders with need by dates of 5/12 and 5/15 all of which should be on the 5/13 truck could I use a formula to fill in the shipping date for those need by dates? We've been doing it manually and although determining the dates isn't difficult it's time consuming when each report has over 3000 lines and there is a report for each customer. If it's not possible then we won't have a choice but I would like to hope so. Please help.
The third column is just to show that the ship dates are on the correct day. It looks different because the dates are Australian (DD/MM/YYYY) rather than American (MM/DD/YYYY), but that shouldn't matter for the function to work.
The function in the Ship Date column:
=IF(OR(TEXT(A8,"dddd")="Tuesday",TEXT(A8,"dddd")="Wednesday",TEXT(A8,"dddd")="Thursday",TEXT(A8,"dddd")="Friday"),A8-WEEKDAY(A8,3),A8-WEEKDAY(A8+2,2))
Need By Date (including header) = A7:A20
Ship Date (including header) = B7:B20
Explanation
TEXT(value, format_text): this is used to convert the date (DD/MM/YYYY) to the long day (e.g. Monday)
Breakdown
IF the day is Tues, Wed, Thurs, or Fri
THEN return the date of that weeks Monday
ELSE return the date of that weeks Friday

Weekday(...) shows wrong weekday

I live in Europe. Week starts on Monday and ends on Sunday.
Today is Friday, the 5th day of the week.
https://1drv.ms/x/s!AncAhUkdErOkgqR6jJ76GcWrCJozpQ?e=mRH7Ab
=Weekday(Today();2)
shows Thursday as weekday, not friday.
Why?
And why shows Returntype 1 (or omitted) Friday, it should show Saturday (6th day of the week)?
And what is the difference between Returntype 2 and 11?
WEEKDAY is returning the correct result in that cell - i.e. 5.
If you format 5 as ddd, you are actually formatting the date 5 days after 31.12.1899 which is the 5th Jan 1900, which was a Thursday.

Find the trading date every 2 weeks (if Saturday or Sunday, then show Friday date)

For a backtesting trading system, I need to rotation my positions every 2 weeks, BUT if the day is a Saturday or Sunday, I need to take the Friday.
Semi-Monthly updates are made twice a month; mid-month and month end.
Mid-month updates are on the 15th calendar day of each month. Should the 15th be a weekend or holiday, the update will occur on the last trading day prior to the 15th.
For example, if the 15th is a Saturday then the update will occur on the close of Friday the 14th.
I need to return a list of dates of rotation based on a start date and end date.
Let's say, I need every 15 days from January 1st 2018 to 31st December 2018, it should return only the valid dates based on the rules described above.
The formula should be for Google Sheet or Excel.
I tried the following:
It is not returning exactly what I need, since the google sheet googlefinance formula allows to use daily and weekly intervals (1 or 7). See below the googlefinance definition (https://support.google.com/docs/answer/3093281?hl=en):
"interval - [ OPTIONAL ] - The frequency of returned data; either "DAILY" or "WEEKLY".
interval can alternatively be specified as 1 or 7. Other numeric values are disallowed."
You need to be more precise in your specifications. You've provided multiple inconsistent intervals. eg: Two weeks (which would be every 14 days and will always fall on the same weekday); every 15 days (which will NOT be mid-month and EOM over most time periods); mid-month and end-of-month.
I suggest developing formulas for each of your desired intervals.
Once you have developed those relevant formulas, depending on your desired interval, to avoid a date falling on a weekend (or holiday if required for your system), you can use the WORKDAY function:
=WORKDAY(computedDate+1,-1, [holiday])
If your computedDate is on a Saturday, or Sunday; by adding 1 day and then subtracting to the previous workday, Friday will result.
If your trading interval is every Two weeks, you only need to ensure that the First date is not on a Saturday or Sunday. For other intervals, you may have to apply the formula to every computedDate.

Excel date calculation within a specific week number

I need to figure out how to get the dates for both the Tuesday and Thursday in the next week.
I'm currently getting the week number by using: =WEEKNUM(NOW(),)+1
I'm not sure where to go from here, please help me out.
You could use the following for Tuesday:
=NOW()+9-WEEKDAY(NOW(),2)
9 because 1 week is 7 days, then Tuesday is day 2 of the week, so 7+2=9.
For Thursday:
=NOW()+11-WEEKDAY(NOW(),2)
Same reasoning as above with Thursday being 4, so 7+4=11.
The formula basically takes the current date, adds a week (7) and then adjusts for the weekday considering today's weekday.

Weekly report depending on weekday SSRS2012

I'm trying to create report which on Monday will fill only Monday column, on Tuesday Monday and Tuesday columns etc.
One problem is that reporting day is only 1 day - lets say Friday. I set main report and subreports for each day but it wont work since on Monday there was an event that did not occurred on Friday so it does not appear in my report.

Resources