bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL TIMESTAMP() Function

Concept visual

MySQL TIMESTAMP() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return a datetime value based on the arguments: 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

Parameter

Description expression

Required. A date or datetime value time Optional. A time value to add to expression

Technical Details

Works in:

From MySQL 4.0

More Examples

Example

Return a datetime value based on the arguments:

SELECT TIMESTAMP("2017-07-23");

Previous

❮ MySQL Functions

Next

Previous

MySQL TIMEDIFF() Function

Next

MySQL TO_DAYS() Function