---
schema_version: "1"
id: 27f53b35dec0a6a4359331136d8fb6cf03a9d176cbc6fbccac2500a8a937c360
title: 日付
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.6/dw-dates-functions-date.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.6/dw-dates-functions-date
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 71e0bf54736bd86160b01b02da84c36776d555a4240d0a42df305a4c3a6a4c65
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
# 日付

## [](#date1)date(parts: DateFactory): Date

`year`​ 項目、​`month`​ 項目、​`day`​ 項目について指定された値から ​`Date`​ 値を作成します。

_DataWeave バージョン 2.4.0 で導入されました。_

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

<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>parts</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><code>year</code>​ 項目、​<code>month</code>​ 項目、​<code>day</code>​ 項目の ​<code>Number</code>​ 値。​<code>month</code>​ は 1 ～ 12 の値である必要があり、​<code>day</code>​ 値は 1 ～ 31 の値である必要があります。名前-値のペアは任意の順序で指定できますが、出力はデフォルトで Date (日付) 値として並び替えられます (​<code>2012-10-11</code>​ など)。入力項目は ​<code>DateFactory</code>​ 型の一部です。</p>
</div></div></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、​`Date`​ 型の値を作成する方法を示しています。

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

```DataWeave
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
   newDate: date({year: 2012, month: 10, day: 11})
}
```

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

```Json
{
   "newDate": "2012-10-11"
}
```