The DateTime value to reference.
atBeginningOfHour
atBeginningOfHour(dateTime: DateTime): DateTime
Returns a new DateTime value that changes the Time value in the input to the
beginning of the specified hour.
The minutes and seconds in the input change to 00:00.
Introduced in DataWeave version 2.4.0.
Parameters
| Name | Description |
|---|---|
|
Example
This example changes the Time value within the DateTime input to the
beginning of the specified hour.
Source
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
"atBeginningOfHourDateTime": atBeginningOfHour(|2020-10-06T18:23:20.351-03:00|)
}DataWeave
Output
{
"atBeginningOfHourDateTime": "2020-10-06T18:00:00-03:00"
}Json
atBeginningOfHour(localDateTime: LocalDateTime): LocalDateTime
Returns a new LocalDateTime value that changes the Time value in the input to the
beginning of the specified hour.
The minutes and seconds in the input change to 00:00.
Introduced in DataWeave version 2.4.0.
Parameters
| Name | Description |
|---|---|
|
The |
Example
This example changes the Time value within the LocalDateTime input to the
beginning of the specified hour.
Source
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
"atBeginningOfHourLocalDateTime": atBeginningOfHour(|2020-10-06T18:23:20.351|)
}DataWeave
Output
{
"atBeginningOfHourLocalDateTime": "2020-10-06T18:00:00"
}Json
atBeginningOfHour(localTime: LocalTime): LocalTime
Returns a new LocalTime value that changes its value in the input to the
beginning of the specified hour.
The minutes and seconds in the input change to 00:00.
Introduced in DataWeave version 2.4.0.
Parameters
| Name | Description |
|---|---|
|
The |
Example
This example changes the LocalTime value to the
beginning of the specified hour.
Source
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
"atBeginningOfHourLocalTime": atBeginningOfHour(|18:23:20.351|)
}DataWeave
Output
{
"atBeginningOfHourLocalTime": "18:00:00"
}Json
atBeginningOfHour(time: Time): Time
Returns a new Time value that changes the input value to the
beginning of the specified hour.
The minutes and seconds in the input change to 00:00.
Introduced in DataWeave version 2.4.0.
Parameters
| Name | Description |
|---|---|
|
The |
Example
This example changes the Time value to the beginning of the specified hour.
Source
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
"atBeginningOfHourTime": atBeginningOfHour(|18:23:20.351-03:00|)
}DataWeave
Output
{
"atBeginningOfHourTime": "18:00:00-03:00"
}Json



