ComeçarComece de graça

Manipulating the current date and time

Most of the time when you work with the current date and time, you will want to transform, manipulate, or perform operations on the value in your queries. In this exercise, you will practice adding an INTERVAL to the current timestamp as well as perform some more advanced calculations.

Let's practice retrieving the current timestamp. For this exercise, please use CURRENT_TIMESTAMP instead of the NOW() function and if you need to convert a date or time value to a timestamp data type, please use the PostgreSQL specific casting rather than the CAST() function.

Este exercício faz parte do curso

Functions for Manipulating Data in PostgreSQL

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

--Select the current timestamp without timezone
SELECT ___::___ AS ___;
Editar e executar o código