---
schema_version: "1"
id: 5fff19acf20d92fe7eb195c9e84e5f17638530e3c7cf6cb2bcdb7f54a80f0598
title: localDateTime
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.4/dw-dates-functions-localdatetime.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.4/dw-dates-functions-localdatetime
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 73cab09c1e649a4fb3d2fb7c252228db7c364db5a488d82ebf26e24ff784894d
description: MuleSoft Documentation Site
release: "2.4"
latest: false
---
# localDateTime

## [](#localdatetime1)localDateTime(parts: LocalDateTimeFactory): LocalDateTime

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

_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>hour</code>​ 項目、​<code>minutes</code>​ 項目、​<code>seconds</code>​ 項目の ​<code>Number</code>​ 値。有効な値は、​<code>month</code>​ 項目では 1 ～ 12、​<code>day</code>​ 項目では 1 ～ 31、​<code>hour</code>​ 項目では 0 ～ 23、​<code>minutes</code>​ 項目では 0 ～ 59、​<code>seconds</code>​ 項目では 0 ～ 59 (59.99 などの小数を含む) です。
            名前-値のペアは任意の順序で指定できますが、出力はデフォルトの ​<code>LocalDateTime</code>​ 値として並び替えられます (​<code>2012-10-11T10:10:10</code>​ など)。入力項目は ​<code>LocalDateTimeFactory</code>​ 型の一部です。</p>
</div></div></td>
</tr>
</tbody>
</table>

### [](#例)例

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

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

```DataWeave
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
    newLocalDateTime: localDateTime({year: 2012, month: 10, day: 11, hour: 12, minutes: 30, seconds: 40})
}
```

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

```Json
{
   "newLocalDateTime": "2012-10-11T12:30:40"
}
```