The DateTime
value to reference.
atBeginningOfYear
atBeginningOfYear(dateTime: DateTime): DateTime
Takes a DateTime
value as input and returns a DateTime
value for
the first day of the year specified in the input. It also sets the Time
value to 00:00:00
.
The month, day, and time in the input changes to 01-01T00:00:00
.
Introduced in DataWeave version 2.4.0.
Example
This example transforms the DateTime
input (|2020-10-06T18:23:20.351-03:00|
)
to the date of the first day of the Year
value (2020
) in the input.
atBeginningOfYear(localDateTime: LocalDateTime): LocalDateTime
Takes a LocalDateTime
value as input and returns a LocalDateTime
value for
the first day of the year specified in the input. It also sets the Time
value to 00:00:00
.
The month, day, and time in the input changes to 01-01T00:00:00
.
Introduced in DataWeave version 2.4.0.
Example
This example transforms the LocalDateTime
input (|2020-10-06T18:23:20.351|
)
to the date of the first day of the Year
value (2020
) in the input.
atBeginningOfYear(date: Date): Date
Takes a Date
value as input and returns a Date
value for
the first day of the year specified in the input.
The month and day in the input changes to 01-01
.
Introduced in DataWeave version 2.4.0.