---
schema_version: "1"
id: b98434be7b940551b62214393a79baa6675aba06f8bdd0e6892e1416d1b8da9c
title: daysBetween
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dw-core-functions-daysbetween.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dw-core-functions-daysbetween
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 5b73e5da06efb07e031047122b7e6b87f756965af45073eb039a33ddb6b7d65a
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# daysBetween

## [](#daysbetween1)daysBetween(Date, Date): Number

2 つの日付間の日数を返します。

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>from</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">開始日 (​<code>Date</code>​ (日付) 型)。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>to</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">終了日 (​<code>Date</code>​ (日付) 型)。​<code>to</code>​ の日付が ​<code>from</code>​ の日付よりも​<em>前</em>​の場合、この 2 つの日付間の日数に等しい負数が返されます。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、指定された日付間の日数を返します。

#### [](#ソース)ソース

```DataWeave
%dw 2.0
output application/json
---
{ days : daysBetween('2016-10-01T23:57:59-03:00', '2017-10-01T23:57:59-03:00') }
```

#### [](#出力)出力

```JSON
 { "days" : 365 }
```