I have 2 fields of DateTime from CRM 365 Online and want to create a custom report with a textbox that calculates the number of days between 2 dates excluding weekends in FetchXML (Bonus to also exclude holidays from the standard holiday schedule)
Any ideas?
Related
I'm making a query that needs to show dates for members that signed up between 11 months and a year ago from todays date so that the user can tell what members need to renew their membership and I'm not sure how to accomplish this in the criteria area
For full months, that could be:
Where DateDiff("m", [SignUpDate], Date()) Between 11 And 12
If you need per the exact date, it takes some more:
Calculate Full Months Between Two Dates in MS ACCESS Query
Using that function, the criteria will be:
Where Months([SignUpDate], Date()) Between 11 And 12
Title might not be worded the greatest.
Anyway, I have a report and I am trying to set a field where a user can enter an amount of days they want subtracted from today's date.
Ex. The report gets data from July 4 to July 4, if they enter 7 in this parameter, it takes the end date and subtracts 7 from it so they get a week's data.
What is the best way to do this?
I currently have a stored procedure for showing sales per day for a year, the field is just a date time field, is there a way I can group by just the month with in a SSRS Matrix without having to amend the stored procedure to show the month?
Thanks
I have here some question regarding on the above subject.
I have a parameter which is Start Date (01/01/2013)
and End Date (03/31/2013)
and a table which displays the data.
Here is my question
Can I repeat the table by month?
so if my date range is 01/01/2013 to 03/31/2013
I should have 3 tables for January - February - March
Is this possible?
Use a List control, grouped on Month Name or Month Number (or anything to designate a month), put a table within the List control to house your data for each month.
My db is made of groups of entries (by user) with a row for each day of the week and also groups where there is only 1 row per week of the year. This week may start Sat, Sun or Mon.
The sql groups all these rows by user id and works fine for the entries where the user has a row for every day
The problem I have is selecting the users rows where there is only one entry per week
Basically if the rows date is 11th Feb 2012 then I need to be able to select that row if the start date criteria falls on that date or within that following week and all rows upto but not including the row where the date column is after the end date
I'm trying everything like dateadd in the sql but I just cannot get it to add these rows in.
Hope I've made myself clear.
Say I have two entries in the db
2013-02-02
2013-02-09
I have a start date of 2013-02-05 and an end date of 2012-02-13
I need to get those two row as:
the start date falls on or within the week of 2013-02-02
and I also need 2013-02-09 as the end date falls on or within the week of that date.
Hope that makes it a bit clearer.
Not sure exactly what your question is asking.
If your field is of mysql date or datetime type, and you wanted to find if there was an entry for a given week could you not use MySQL WEEK Function to find all entries for the given week, you may also need to include a restriction on YEAR too.
You could also include the following week, but you may encounter problems. The main problem being week 52+1 of 2012 wont give week 1 of 2013, but week 1 of 2012.