bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL TIMESTAMP() Function

Example

SELECT TIMESTAMP("2017-07-23",  "13:10:11");

Definition and Usage

The TIMESTAMP() function returns a datetime value based on a date or datetime value.

Note

If there are specified two arguments with this function, it first adds the second argument to the first, and then returns a datetime value.

Syntax

TIMESTAMP(
expression
,
time
)

Parameter Values

ParameterDescription
expressionRequired. A date or datetime value
timeOptional. A time value to add to expression

Technical Details

Works in:From MySQL 4.0

Previous

MySQL TIMEDIFF() Function

Next

MySQL TO_DAYS() Function