I have a question about how to SELECT a DATETIME field in a SQL statement. The database name is SCHEDULE. The DATETIME field name is APPOINTMENT. The following does NOT work:
I know that appointment is a TIME variabel and that DATE() is a DATE variable. But from the command window I get can type:
I'm getting hung up on what works in the command window, does not work with the SQL statement. What is the preferred way to select a date from a DATETIME field in a SQL statement?
Jim Rumbaugh
Code:
SELECT * from SCHEDULE where appointment=date()
Code:
test = DTOT(DATE())
? vartype( test ) && types T
? test = DATE() && types .T.
Jim Rumbaugh