In this article, let us review following PostgreSQL date and time functions with practical examples. now() now()::date now()::time date_part() age() extract() date_trunc() to_char() to_timestamp() 1. Get Current Date and Time using PostgreSQL now() Get current date and time using the following query. dbase=# select now(); now ------------------------------ 2010-06-19 09:28:43.98216-07 (1 row) Use the ::time as [...]
My name is Ramesh Natarajan. I will be posting instruction guides, how-to, troubleshooting tips and tricks on Linux, database, hardware, security and web. My focus is to write articles that will either teach you or help you resolve a problem. Read more about