How to Query Team Calendar Events by Date

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

目的

As the filtering and search feature for Team Calendar events is currently not available through the UI just yet, we can query Team Calendar events in the database for reporting or related purposes. The following queries will allow you to search calendar events based on a date:

ソリューション

(info) The query below uses '2021-07-15' as the search term (at the very end of the query), please change it to the date you're looking.

MySQL 

ここをクリックして展開...
SELECT AO_950DC3_TC_EVENTS.SUMMARY, 
AO_950DC3_TC_EVENTS.DESCRIPTION, 
FROM_UNIXTIME((AO_950DC3_TC_EVENTS.START/1000)), 
FROM_UNIXTIME((AO_950DC3_TC_EVENTS.END/1000)), 
AO_950DC3_TC_SUBCALS.NAME 
FROM AO_950DC3_TC_EVENTS 
JOIN AO_950DC3_TC_SUBCALS 
ON AO_950DC3_TC_EVENTS.SUB_CALENDAR_ID = AO_950DC3_TC_SUBCALS.ID
WHERE FROM_UNIXTIME((AO_950DC3_TC_EVENTS.START/1000), '%Y-%m-%d') = '2021-07-15';

Postgres

ここをクリックして展開...
SELECT "AO_950DC3_TC_EVENTS"."SUMMARY", 
"AO_950DC3_TC_EVENTS"."DESCRIPTION", 
to_timestamp(("AO_950DC3_TC_EVENTS"."START"/1000)), 
to_timestamp(("AO_950DC3_TC_EVENTS"."END"/1000)), 
"AO_950DC3_TC_SUBCALS"."NAME" 
FROM "AO_950DC3_TC_EVENTS" JOIN "AO_950DC3_TC_SUBCALS" 
ON "AO_950DC3_TC_EVENTS"."SUB_CALENDAR_ID" = "AO_950DC3_TC_SUBCALS"."ID" 
WHERE to_timestamp(("AO_950DC3_TC_EVENTS"."START"/1000)) ::date = '2021-07-15'

Oracle

ここをクリックして展開...
SELECT AO_950DC3_TC_EVENTS.SUMMARY, 
AO_950DC3_TC_EVENTS.DESCRIPTION, 
to_date('01.01.1970','dd.mm.yyyy') + to_number(AO_950DC3_TC_EVENTS."START")/1000/60/60/24, 
to_date('01.01.1970','dd.mm.yyyy') + to_number(AO_950DC3_TC_EVENTS.END)/1000/60/60/24, 
AO_950DC3_TC_SUBCALS.NAME 
FROM AO_950DC3_TC_EVENTS 
JOIN AO_950DC3_TC_SUBCALS 
ON AO_950DC3_TC_EVENTS.SUB_CALENDAR_ID = AO_950DC3_TC_SUBCALS.ID
WHERE to_date('01.01.1970','dd.mm.yyyy') + to_number(AO_950DC3_TC_EVENTS."START")/1000/60/60/24 = DATE '2021-07-15';

MS SQL

ここをクリックして展開...
SELECT AO_950DC3_TC_EVENTS.SUMMARY, 
AO_950DC3_TC_EVENTS.DESCRIPTION,
dateadd(second,cast(cast(AO_950DC3_TC_EVENTS."START" AS nvarchar(255)) AS bigint)/1000,'19700101 00:00:00:000'),
dateadd(second,cast(cast(AO_950DC3_TC_EVENTS."END" AS nvarchar(255)) AS bigint)/1000,'19700101 00:00:00:000'),
AO_950DC3_TC_SUBCALS.NAME 
FROM AO_950DC3_TC_EVENTS 
JOIN AO_950DC3_TC_SUBCALS 
ON AO_950DC3_TC_EVENTS.SUB_CALENDAR_ID = AO_950DC3_TC_SUBCALS.ID
WHERE dateadd(second,cast(cast(AO_950DC3_TC_EVENTS."START" AS nvarchar(255)) AS bigint)/1000,'19700101 00:00:00:000') = '2021-07-15';


Feature Request

Your feedback and voice are highly appreciated, please feel free to add a comment or engage in the conversation in the suggestion ticket below:



説明 How to Query Team Calendar Events by Date
製品Confluence

最終更新日 2021 年 11 月 22 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.