0 like 0 dislike
72 views
Date format in postgreSQL like select data date or hour wise
in Education & Reference by (720 points) | 72 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 (630 points)

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Mar 28, 2019 in Computers & Internet by Neha (720 points) | 70 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
0 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,227 questions
1,373 answers
559 comments
2,099 users