MySQL Forums
Forum List  »  General

DATETIME SQL TYPE
Posted by: Allen Pham
Date: March 16, 2005 04:31PM

Hello all,

Please help me with the following situation.

I am trying to run the following query:

"SELECT SUM(SUBTOTAL) FROM TRANSACTION WHERE DATE = CURDATE() AND NOT IS_VOIDED"

The DATE field is of type DATETIME (because I want to know both the date and
the time the transaction occured).

I have records that matches the criteria. However, when I run this query I get no
results back.

I have changed the DATE field to TIMESTAMP as well. I still don't get any results
back.

The documetation says the CURDATE() function works. Any clues?

Options: ReplyQuote


Subject
Written By
Posted
DATETIME SQL TYPE
March 16, 2005 04:31PM
March 16, 2005 05:21PM
March 17, 2005 02:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.