Skip to Content
avatar image
Former Member

DATE in BETWEEN

Senhores,

Gostaria de saber como faço para utilizar timestamp nas cláusulas BETWEEN do WHERE.

(+Gentlemen,

I wonder how do I use the timestamp BETWEEN of the WHERE clauses.+)

Example:

( table.row_date BETWEEN (DATE(SUBDATE(timestamp,7)) || ' ' || TIME('00:00:00')) AND (DATE(timestamp|| ' ' || TIME('23:59:59')) )

Está correto?

(Correct?)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 03, 2008 at 02:01 PM

    Hi Marcel,

    the concatenation you're doing there is unnecessary.

    Instead this should work (assuming that rowdate_ is a TIMESTAMP datatyp as I've seen it in your database...)

    table.row_date BETWEEN timestamp(chr(date_column), '00:00:00') 
                   AND timestamp(chr(date_column), '23:59:59')
    

    regards,

    Lars

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Lars Breddemann

      Olá Lars,

      Muito obrigado pelo empenho. Conversarei como o administrador do banco de dados para ver o que conseguimos evoluir das questões que você levantou.

      Mais uma vez, muito obrigado!

      Atenciosamente,

      (+Thank you for commitment. Speak as a database administrator to see what we evolve the issues you raised.

      Again, thank you!

      Regards+)

      Marcel