Nouvelle publication

Rechercher

Résumé
· Juil 1

InterSystems開発者コミュニティのダイジェスト、6月 2025

6月 2025開発者コミュニティ ニュースレターへようこそ。
全体統計
16 件の新しい投稿が公開 (6月 月):
 8件の新着記事
 8の新しい発表
1 人の新メンバーが参加 (6月 月)
1,521 件の投稿が公開 (全期間)
324 人のメンバーが参加 (全期間)
トップ記事
体重のノックアウト
Andre Larsen Barbosa順
今月のトップ作家
記事
お知らせ
#InterSystems IRIS
#InterSystems公式
#IRIS contest
#開発者コミュニティ公式
6月, 2025Month at a GlanceInterSystems Developer Community
Article
· Juin 30 2m de lecture

ObjectScript での日付の比較方法(ObjectScript での SQL 関数実行方法)

これは InterSystems FAQ サイトの記事です。

ObjectScript で日付の比較を行う場合、一旦 $HOROLOG 形式(内部数値)に変換することで算出しやすくなりますが、SQL 関数を利用して算出することもできます。

ObjectScript から SQL 関数を実行するには、%SYSTEM.SQL.Functions クラスを使用します。

※ 2021.1以前のバージョンでは、%SYSTEM.SQL クラスを使用します。

%SYSTEM パッケージは、システム・オブジェクトと呼ばれ ObjectScript では $SYSTEM 特殊変数を利用して以下の構文で実行します。

  $SYSTEM.サブパッケージ名.クラス名.メソッド名() または $SYSTEM.クラス名.メソッド名()

 

以下、SQL 関数 DATEDIFF を使用して日付の比較を行う例です。

USER>write $system.SQL.Functions.DATEDIFF("dd","2025-01-20","2025-03-20")
59

 

分での比較

USER>write $system.SQL.Functions.DATEDIFF("mi","2025-01-20","2025-03-20")
84960

 

秒での比較

USER>write $system.SQL.Functions.DATEDIFF("ss","2025-01-20","2025-03-20")
5097600

 

この他、DATEADD 関数を使って指定日付に日付や時刻を追加することもできます。

指定の日付に10年追加する

USER>write $system.SQL.Functions.DATEADD("year",10,"2025-01-20")
2035-01-20 00:00:00

 

指定の日付の25日前

USER>write $system.SQL.Functions.DATEADD("day",-25,"2025-01-20")
2024-12-26 00:00:00

 

指定日時の16時間前

USER>write $system.SQL.Functions.DATEADD("hour",-16,"2025-01-20 13:10:00")
2025-01-19 21:10:00

 

指定の日付時刻の指定箇所のみを取り出す DATEPART 関数の実行例は以下の通りです。

hour を取り出す

USER>write $system.SQL.Functions.DATEPART("hour","2025-01-20 13:10:00")
13

 

dayofyear を返す

USER>write $system.SQL.Functions.DATEPART("dayofyear","2025-10-20 13:10:00")
293

 

dayを返す

USER>write $system.SQL.Functions.DATEPART("day","2025-10-20 13:10:00")
20

 

この他のSQL関数については、ドキュメントをご参照ください。

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Annonce
· Juin 30

[Webinar] The Future of Healthcare Integration with Health Connect & InterSystems

Hey Community,

We're excited to invite you to the next InterSystems UKI Tech Talk webinar: 

👉The Future of Healthcare Integration with Health Connect & InterSystems

⏱ Date & Time: Thursday, July 3, 2025 10:30-11:30 UK

Speakers:
👨‍🏫 @Mark Massias, Senior Sales Engineer, InterSystems
👨‍🏫 Mike Fitzgerald. Head of Customer Solutions, ReStart

2025 Tech Talk Social Tile 19 Jun (draft) (3).png

As the NHS continues to advance its digital transformation agenda, seamless interoperability has become a crucial priority for healthcare IT professionals. InterSystems Health Connect is leading the way as a superior integration engine, offering enhanced scalability, security, and performance to support evolving data exchange needs.

This exclusive webinar will explore how you can overcome interoperability challenges, streamline system migrations, and benefit from real-world success stories—ensuring you stay ahead of NHS standards for connected care.

Join us for an insightful session where InterSystems and our highly experienced implementation partner ReStart will showcase the benefits of Health Connect, providing actionable strategies for seamless integration and transitioning from legacy solutions. Discover how Health Connect supports NHS standards out-of-the box and enhances connectivity across trust and regional healthcare networks.

This is your opportunity to future-proof your healthcare IT strategy and drive smarter, more efficient data integration.

>> REGISTER HERE <<

2 nouveaux commentaires
Discussion (2)2
Connectez-vous ou inscrivez-vous pour continuer
Discussion (4)2
Connectez-vous ou inscrivez-vous pour continuer
Annonce
· Juin 30

[Video] Uncovering and Accelerating Customer Value Through Collaboration

Hi Community,

Enjoy the new video on InterSystems Developers YouTube:

⏯ Uncovering and Accelerating Customer Value Through Collaboration @ Global Summit 2024

Gone are the days of old school “vendor-customer” and sometimes adversarial relationships. Today, the most successful relationships between customers and their solution providers are viewed as "partnerships" built on measurable business value achievement and true mutual collaboration. Hear from panelists as they share strategies and examples of how customer success, solution adoption and value can be achieved and accelerated across the customer journey, from initial sale, through on-going execution year 1 to year n. Attendees will gain a deeper understanding of the collaborative efforts required for long-term achievement and get a glimpse into the future of customer success engagement strategies.    

Presenters:
🗣 @Jim Breen, Learning Services Director, InterSystems
🗣 @Jenny Ames, Manager, Online Learning Content, InterSystems
🗣 Art Dirik, Head of Customer Success, InterSystems
🗣 @Chi Nguyen-Rettig, Chief Technology Officer, LEAD North, LLC  

Discover what’s next — watch the video and subscribe to stay informed.

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer