Claim your Biolink Click Here
0 like 0 dislike
415 views
Date format in postgreSQL like select data date or hour wise
in Education & Reference by (1.1k points) | 415 views

2 Answers

0 like 0 dislike

For Day Wise

TO_CHAR(columnname, 'YYYY-MM-DD') as Day 

For Hour Wise

TO_CHAR(columnname, 'YYYY-MM-DD HH24') as Hour 

For Minute Wise

TO_CHAR(columnname, 'YYYY-MM-DD HH24 MI') as Minute 
by
0 like 0 dislike
SELECT count(column) as columnA, TO_CHAR(datetime_column, 'YYYY-MM-DD HH24') as columnB  FROM table_name 
group by TO_CHAR(datetime_column, 'YYYY-MM-DD HH24') order by columnB ;
by (830 points)

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Mar 28, 2019 in Computers & Internet by Neha (1.1k points) | 327 views
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,308 questions
1,469 answers
568 comments
4,809 users