postgresql get date from datetime
SELECT DATE(column_name) FROM table_name;
postgresql get date from datetime
SELECT DATE(column_name) FROM table_name;
postgresql get date now
If you want get the current date and time without timezone, you can cast it explicitly as follows:
SELECT NOW()::timestamp;
now
----------------------------
2017-03-17 18:37:29.229991
(1 row)
Code language: SQL (Structured Query Language) (sql)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us