---
schema_version: "1"
id: 06aca98a8027880b6398a0b9a0930814929e6c8065efece65ba38ecd2a07fa5e
title: atBeginningOfHour
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.7/dw-dates-functions-atbeginningofhour.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.7/dw-dates-functions-atbeginningofhour
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c43e32c5067271120a0f6bfcefe8336db4356d6d0e3e1e0aa65e69d99b6c1f78
description: MuleSoft Documentation Site
release: "2.7"
latest: false
---
# atBeginningOfHour

## [](#atbeginningofhour1)atBeginningOfHour(dateTime: DateTime): DateTime

入力内の ​`Time`​ 値を指定された​_時間_​の開始に変更する新しい ​`DateTime`​ 値を返します。

入力内の分および秒は ​`00:00`​ に変更されます。

_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>dateTime</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>参照する ​<code>DateTime</code>​ 値。</p>
</div></div></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、​`DateTime`​ 入力内の ​`Time`​ 値を指定された​_時間_​の開始に変更します。

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

```DataWeave
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
   "atBeginningOfHourDateTime": atBeginningOfHour(|2020-10-06T18:23:20.351-03:00|)
}
```

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

```Json
{
 "atBeginningOfHourDateTime": "2020-10-06T18:00:00-03:00"
}
```

## [](#atbeginningofhour2)atBeginningOfHour(localDateTime: LocalDateTime): LocalDateTime

入力内の ​`Time`​ 値を指定された​_時間_​の開始に変更する新しい ​`LocalDateTime`​ 値を返します。

入力内の分および秒は ​`00:00`​ に変更されます。

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

### [](#パラメーター-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>localDateTime</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>参照する ​<code>LocalDateTime</code>​ 値。</p>
</div></div></td>
</tr>
</tbody>
</table>

### [](#例-2)例

次の例では、​`LocalDateTime`​ 入力内の ​`Time`​ 値を指定された時間の開始に変更します。

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

```DataWeave
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
   "atBeginningOfHourLocalDateTime": atBeginningOfHour(|2020-10-06T18:23:20.351|)
}
```

#### [](#出力-2)出力

```Json
{
 "atBeginningOfHourLocalDateTime": "2020-10-06T18:00:00"
}
```

## [](#atbeginningofhour3)atBeginningOfHour(localTime: LocalTime): LocalTime

入力内のその値を指定された​_時間_​の開始に変更する新しい ​`LocalTime`​ 値を返します。

入力内の分および秒は ​`00:00`​ に変更されます。

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

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

<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>localTime</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>参照する ​<code>LocalTime</code>​ 値。</p>
</div></div></td>
</tr>
</tbody>
</table>

### [](#例-3)例

次の例では、​`LocalTime`​ 値を指定された時間の開始に変更します。

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

```DataWeave
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
   "atBeginningOfHourLocalTime": atBeginningOfHour(|18:23:20.351|)
}
```

#### [](#出力-3)出力

```Json
{
 "atBeginningOfHourLocalTime": "18:00:00"
}
```

## [](#atbeginningofhour4)atBeginningOfHour(time: Time): Time

入力値を指定された​_時間_​の開始に変更する新しい ​`Time`​ 値を返します。

入力内の分および秒は ​`00:00`​ に変更されます。

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

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

<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>time</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>参照する ​<code>Time</code>​ 値。</p>
</div></div></td>
</tr>
</tbody>
</table>

### [](#例-4)例

次の例では、​`Time`​ 値を指定された時間の開始に変更します。

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

```DataWeave
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
   "atBeginningOfHourTime": atBeginningOfHour(|18:23:20.351-03:00|)
}
```

#### [](#出力-4)出力

```Json
{
 "atBeginningOfHourTime":  "18:00:00-03:00"
}
```