C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL CURRENT_TIMESTAMP() FunctionThe current_timestamp() is a MySQL date/time function. It is used to get the current date and time. Syntaxselect current_timestamp(); ParameterNA ReturnsThe current_timestamp function returns the current date and time. It will return the current date as a 'YYYY-MM-DD HH:MM:SS' format if used in a string context. It will return the current date as a YYYYMMDDHHMMSS format if used in a numeric context. Example 1Select current_timestamp(); Output: Example 2Select current_timestamp()+2; Output:
Next TopicMySQL date/time
|