Skip to content

Documentation for DATETRUNC#10756

Open
dahfjkg wants to merge 1 commit intomendix:developmentfrom
dahfjkg:dat/datetrunc
Open

Documentation for DATETRUNC#10756
dahfjkg wants to merge 1 commit intomendix:developmentfrom
dahfjkg:dat/datetrunc

Conversation

@dahfjkg
Copy link
Contributor

@dahfjkg dahfjkg commented Feb 13, 2026

To be published with 11.9 release. Needs team review.


##### timezone

`timezone` specifies the time zone to use for truncation. This parameter is optional and defaults to the local time zone. It should be a string literal containing an IANA time zone. GMT offset time zones are not supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "local time zone" is used in many places, but I think it is unclear what that means. "user time zone" may be better, possibly with a link to https://docs.mendix.com/refguide/date-and-time-handling/.

{{% /alert %}}

{{% alert color="info" %}}
For the date part type `WEEK`, the result of the `DATETRUNC` function depends on the database configuration. For example, by default, the first day of the week in MS SQL Server is Sunday, which means that dates are truncated to previos Sunday if date part type `WEEK` is used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in previo[u]s.


##### timezone

`timezone` specifies the time zone to use for truncation. This parameter is optional and defaults to the local time zone. It should be a string literal containing an IANA time zone. GMT offset time zones are not supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to mention the option of using 'UTC' explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants