0

I know about \echo but that just seems to output the rest of the line literally, i want something like \echo date

3
  • select current_date; Commented Mar 12, 2015 at 12:05
  • thx thats does indeed work Commented Mar 12, 2015 at 14:18
  • Please take a look to the documentation to learn differences between current_date and other function that gives also the current date/time --> here Commented Mar 13, 2015 at 11:22

3 Answers 3

1

So based on the comment

select current_time

works for me.

Sign up to request clarification or add additional context in comments.

Comments

0

The only example in pg docs is actually the answer to this...

\echo date

Comments

0

And if you want both the date and the time (almost always) use:

select now();

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.