I'm currently struggeling with the Microsoft Graph REST-API.
What I'm trying to do is list todays events (happening between midnight and midnight). From the documentation, the filter function is very limited.
My current statement looks like this:
https://graph.microsoft.com/v1.0/me/events?$top=100&$select=*&$filter=start/DateTime ge '2017-10-31T00:00:00' AND end/DateTime le '2017-11-1T00:00:00'&$orderby=start/DateTime ASC
The interesting part is here $filter=start/DateTime ge '2017-10-31T00:00:00' AND end/DateTime le '2017-11-1T00:00:00' using the start and the end and checking if start >= TODAY AND end <= TODAY+1. That's all working great for dates that are shorter as 1 day.
My problem is now how to get events that last longer than one day e.g. start = YESTERDAY and end = NEXT WEEK. Which means the start date is before today and the end day is as well not included in this range.
How to get this events?
I believe you should be using Calendar View for your scenario:
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/calendar_list_calendarview
The link that Yogesh referenced seems to be removed and not found. Here is the link that I used which shows how to use the calendar view. Hopefully this helps -- https://learn.microsoft.com/en-us/graph/api/calendar-list-calendarview?view=graph-rest-1.0&tabs=http
Related
I am new to jql and puzzled on how to write jql query for this .
I want to get all open issues on start of N'th week in past and no of all issues closed by end of that week.
e.g . 3rd week in past , my week start day is monday morning and ends at sunday night. i want to get no of open issues on beginning monday morning , and no of all issues closed on end of the day sunday for that week
You can use the WAS operator with an ON constraint like the following:
status was open on "2020-01-01"
Instead of a fixed date you can also use the JQL functions startOfWeek() and endOfWeek, but be carefull start of week and end of week may depend on the configured locale.
I'm setting up Google Sheet report using the Google Analytics app to generate a custom report, I've spent days searching for info on the subject all over the web for an answer to set current month for the report.
I can set start and end date with no problem, but I want the automated reports to be able to reset to the current month without me having to update the start and end date every month.
To achieve this, use the below:
For End Date, use
today
or, to make your report upto the previous day:
yesterday
For the start date, use the formula below:
=CONCATENATE(YEAR(today()),"-",
IF(LEN(MONTH(TODAY()))=1,CONCATENATE(0,MONTH(TODAY())),MONTH(TODAY())),
"-01" )
The formula will concatenate the current year, current month, and 01.
Another way to approach this problem is through using EOMONTH, for example to get the first day of this month:
=EOMONTH(today(), -1)+1
I am using postrges db.
My domain has a date field:
java.util.Date requestedDate;
I am trying to search by date in my controller:
eq ("requestedDate", requestedDate)
This works fine, but the problem is that date and time has to be exactly matching for this. But in application the user will only enter the date to search items (like give me all requests which are made on 2014-02-05 and the browser application will add the current time to the request). So the comparison fails because the user entered time is different from the time during creation of the request.
I tried 'like' but it throws error.
How to compare only date part ?
You could do something like this:
Date now = new Date()
now.clearTime()
def results = Meeting.withCriteria {
between('date', now, now+1)
}
So this strips off the time portion of the current date, and then does a 'between' query (between midnight just gone and midnight 24 hours later).
Still it looks like there is no convenient way to realize this.
You need a small detour by computing the start of the day and the end of the day and use the between operator.
EDIT
I just saw now rcgeorge23 gave you the right example for doing this.
My work week goes from Monday to Sunday and I need to find a way to have 2 different cells automatically update based on =today() what the actual date of the start and end of the current work week is.
Is there a formula that can find this?
Similarly:
Is there also a similar method to automate the first and last days of the current month in different cells?
Thank you ahead of time for any assistance
Assuming you're referencing a date in A1...
Start of the work week containing that date (assuming work week starts on Monday):
=A1-WEEKDAY(A1;3)
End of the work week:
=A1-WEEKDAY(A1;3)+6
Start of the month:
=EOMONTH(A1;-1)+1
End of the month:
=EOMONTH(A1;0)
I know this is Microsoft Excel documentation, but this describes the EOMONTH function.
We're on Team Foundation Server 2008 and I'm trying to find a way to report on the change in completed work from week to week at the task level. The MDX query below works pretty well, but I'd like to get rid of need to hard code last week's date. I've tried using prevmember and parallelperiod without success, but I'm no MDX expert.
WITH
MEMBER [Measures].[Completed Work by WI on dt1] AS
(
[Assigned To].[Person].CurrentMember,
[Work Item].[System_Id].CurrentMember,
[Date].[Year Week Date].[Week].&[2008-12-07T00:00:00],
[Measures].[Microsoft_VSTS_Scheduling_CompletedWork]
)
MEMBER [Measures].[Completed Work by WI on dt2] AS
(
[Assigned To].[Person].CurrentMember,
[Work Item].[System_Id].CurrentMember,
[Date].[Year Week Date].CurrentMember,
[Measures].[Microsoft_VSTS_Scheduling_CompletedWork]
)
MEMBER [Measures].[Completed Work] AS
[Measures].[Completed Work by WI on dt2] - [Measures].[Completed Work by WI on dt1]
SELECT
NON EMPTY
{
[Measures].[Completed Work]
}
ON COLUMNS,
NON EMPTY
{
Filter(
([Assigned To].[Person].[Person],[Work Item].[System_Id].[System_Id],[Work Item].[System_Title].[System_Title]), [Measures].[Completed Work] >0 )
}
ON ROWS
FROM [Team System]
Look at the provided Work Completed report. It automatically sets one of its date fields to today minus one month.
EDIT: Just logged into my work system to double check on this. The report is actually called "Remaining Work". Go to the SharePoint portal that was created for your Team Project, and find the list of standard reports. It'll be in that list. You can export that report to file, open it in Visual Studio and see the date field logic.
EDIT2: For an MDX function to get the previous week, try a variation on this: http://social.msdn.microsoft.com/Forums/en-US/tfsreporting/thread/0a656453-eaf1-47a2-a376-cb6eaec0db51
#sliderhouserules - I took a look at that report and it appears it is just taking the date entered and using the strtomember function. In my query, it looks like it would be the equivalent of the line with the hard coded date with:
StrToMember("[Date].[Year Week Date].[Week].&[" + Format(DATEADD("d", -7, "2008-12-21"), "s") + "]")
This works fine. However, what I really want is to eliminate the need to hard code anything. I tried using the Now() function instead of the hard coded date. I wasn't able to get it to work, but even if I did it would still mean that I'd need to change the number of days to subtract to get back to the Sunday of the previous week. It seems like there should be an MDX function that would make this work. If not, then perhaps there is some way to modify the StrToMember line to derive the previous Sunday's date in the proper format.