The DateTime
value to reference.
atBeginningOfDay
atBeginningOfDay(dateTime: DateTime): DateTime
Returns a new DateTime
value that changes the Time
value in the input to the
beginning of the specified day.
The hours, minutes, and seconds in the input change to 00: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 day.
Source
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
"atBeginningOfDayDateTime": atBeginningOfDay(|2020-10-06T18:23:20.351-03:00|)
}
DataWeave
Output
{
"atBeginningOfDayDateTime": "2020-10-06T00:00:00-03:00"
}
Json
atBeginningOfDay(localDateTime: LocalDateTime): LocalDateTime
Returns a new LocalDateTime
value that changes the Time
value within the
input to the start of the specified day.
The hours, minutes, and seconds in the input change to 00: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 day.
Source
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
"atBeginningOfDayLocalDateTime": atBeginningOfDay(|2020-10-06T18:23:20.351|)
}
DataWeave
Output
{
"atBeginningOfDayLocalDateTime": "2020-10-06T00:00:00"
}
Json