1

I need help in my SQL. I need to modify this part "19-DECEMBER-2016 11:00" to something like "TODAY 11:00"

The table where i need to get the date and time is in this format "12/19/2016 11:00 AM"

SELECT /*+ FULL MERGE */
a.DATETIME start_time,
a.ENODEB,
a.EUTRANCELL,
a.PERIOD AS Period,

FROM
ALU_EUTRAN.ENB_EUCELL_RRC a
and a.datetime = TO_DATE('19-DECEMBER-2016 11:00', 'DD-MON-YYYY HH24:MI')

I'll appreciate all the help. Thanks in advance.

  • Possible duplicate of [Getting timestamp using MySQL](http://stackoverflow.com/questions/4411311/getting-timestamp-using-mysql) – Juan Carlos Oropeza Dec 19 '16 at 20:52
  • First things first....which DBMS are you using? mysql <> sql server. – Sean Lange Dec 19 '16 at 20:52
  • 1. You have a trailing `,` before the `FROM`. 2. You don't have a `WHERE` clause, only an `AND`. 3. You have both `MySQL` and `SQL Server` tagged (which DBMS are you *actually* using?) – Siyual Dec 19 '16 at 20:52
  • `a.datetime = NOW()` unless you want timestamp – Juan Carlos Oropeza Dec 19 '16 at 20:57
  • I did not put the whole Query in the above info. I am using TOAD to do my queries....and yes I need the time stamp. a.datetime = NOW () + 11:00AM for example. – ReyFernandez 1 hour ago – ReyFernandez Dec 20 '16 at 05:03

0 Answers0