Skip to Main Content

How To get Hour so Far for Specific Date in Sql Query

user11691341Jul 31 2018 — edited Jul 31 2018

I need a Sql query whhere for s Specific Date it should show me the Hour we have.

Example

if the Date is Today i.e. 31-JULY-2018 and Time when we are running the query is 10:20:30

it will give output as

-------------------------------

31-JUL-2018 00

31-JUL-2018 01

31-JUL-2018 02

31-JUL-2018 03

.

.

.

31-JUL-2018 10

if the date is Yesterday 30-JULY-2018

--------------------------------

30-JUL-2018 00

30-JUL-2018 01

30-JUL-2018 02

30-JUL-2018 03

.

.

.

30-JUL-2018 23

This post has been answered by Etbin on Jul 31 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Aug 28 2018
Added on Jul 31 2018
8 comments
926 views