Time related question (Subtime)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • noirsith
    New Member
    • Sep 2008
    • 1

    Time related question (Subtime)

    I am trying to run an automated job that grabs data every half hour from a table. I am hosting this downloaded data in mySQL but the source is DB2. The code for the query currently looks something like this:

    Code:
    SELECT
    ABCDEF.PLAYERS
    WHERE
    ABCDEF.ENDDATTIM 
    BETWEEN 
    NOW() AND SUBTIME(NOW(), '0 0:30:0.000000')
    Unfortunately this mySQL code (the SUBTIME())is not recognized by the DB2, I was looking for an equivalent in DB2 and could not find anything online. Does anyone have a suggestion?

    Thank you.
  • flymike
    New Member
    • Jul 2008
    • 1

    #2
    BETWEEN CURRENT TIMESTAMP AND (CURRENT TIMESTAMP - 30 SECONDS)
    (or minutes or whatever it was)

    Comment

    Working...