Java bro

Java tutorial

Sql queries

Get today midnight timestamp in sql

In this article we wre going to learn how to get today midnight time stamp.

Today mid night:

SELECT TO_CHAR (TRUNC(SYSDATE) , ‘MM-DD-YYYY HH12:MI:SS:PM’) AS CUR_TIME FROM DUAL;

Output :

CUR_TIME
03-07-2016 12:00:00:AM


Comments are Closed

Theme by Anders Norén