bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL TIMESTAMP() Function

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind MySQL TIMESTAMP() Function?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ TIMESTAMP("2017-07-23", "13:10:11");
3Order

Put the learning moves in the order that makes the concept easiest to apply.

The TIMESTAMP() function returns a datetime value based on a date or datetime value.
Definition and Usage
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