pyflink.table.expressions.unix_timestamp#
- unix_timestamp(date_str: Optional[Union[str, pyflink.table.expression.Expression[str]]] = None, format: Optional[Union[str, pyflink.table.expression.Expression[str]]] = None) pyflink.table.expression.Expression [source]#
Gets the current unix timestamp in seconds if no arguments are not specified. This function is not deterministic which means the value would be recalculated for each record.
If the date time string date_str is specified, it will convert the given date time string in the specified format (by default: yyyy-MM-dd HH:mm:ss if not specified) to unix timestamp (in seconds), using the specified timezone in table config.
New in version 1.12.0.