dateTimeExpr

fun dateTimeExpr(str: String): CustomExpr<DateTime>

Creates a non-null DateTime CustomExpr from the given SQL str.

Security: str is copied into the generated SQL verbatim, with no escaping or parameter binding, so never build it from user input or other request data: anything that reaches it is executed as SQL (SQL injection). Pass only fixed SQL such as "CURRENT_TIMESTAMP", and use Exposed's parameterized expressions for values.

Return

a CustomExpr typed as DateTime

Parameters

str

the raw SQL expression text; a fixed SQL fragment, never user input