Need help with query

  • Here is the query I am working with.

    select *

    from table where cast (postdate AS int(128)) between ({fn Curdate()}) and ({fn Curdate()}) + ({fn minute(1439)})

    I originally had this

    select *

    from dispensedetail where postdate between ({fn Curdate()}) and ({fn Curdate()}) + ({fn minute(1439)})

    But recieved this error - "Conversion failed when converting the varchar value '2012-06-20' to data type int."

    Basically I want to run the query where postdate shown is any time within the start of the current date and the end of the current day.

    Any suggestions??:doze:

  • Duplicate post.

    Replies here please.

    -- Gianluca Sartori

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply