---
schema_version: "1"
id: 570299081e13f746f22da9977dc43042681e07699c248437a57f616a9648a459
title: toLocalTime
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.6/dw-coercions-functions-tolocaltime.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.6/dw-coercions-functions-tolocaltime
source_site: docs.mulesoft.com
content_type: documentation
content_hash: ba22840ae48a17670b176a047ba211865ed5dd3e014bd30fd95b0acfa358a3fb
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
# toLocalTime

## [](#tolocaltime1)toLocalTime(str: String, format: String | Null = null, locale: String | Null = null): LocalTime

`String`​ 値を ​`LocalTime`​ 値に変換して、形式とロケールを受け入れます。

_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>str</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>LocalTime</code>​ 値に変換する ​<code>String</code>​ 値。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>format</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>LocalTime</code>​ 値に対して使用する書式設定。
           ​<code>null</code>​ 値は ​<code>LocalTime</code>​ 値に対して無効です。
           このパラメーターでは、ISO-8601 に基づいた Java 文字パターンを受け入れます。​<code>22:15:30.000000</code>​ などの ​<code>LocalTime</code>​ 値の形式は ​<code>HH:mm:ss.n</code>​ となります。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>locale</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">使用する省略可能な ISO 3166 国コード (​<code>US</code>​、​<code>AR</code>​、​<code>ES</code>​ など)。​<code>null</code>​ または欠落値では JVM のデフォルトが使用されます。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、さまざまな入力での ​`toLocalTime`​ の動作を示します。

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

```DataWeave
%dw 2.0
import * from dw::util::Coercions
output application/json
---
{
   toLocalTimeEx: toLocalTime("23:57:59"),
   toLocalTimeEx2: toLocalTime("13:44:12.283","HH:mm:ss.n")
}
```

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

```DataWeave
{
  "toLocalTimeEx": "23:57:59",
  "toLocalTimeEx2": "13:44:12.283"
}
```