Here's an easy way that you can use even if you don't know how the backend database formats datetime fields:
m.ldStartDate=DTOT({^1998/01/01})
q = sqlconnect("testa")
=sqlexec(q,"select * from test where newdatet>?m.ldStartDate" ,"Mycursor")
>How handle a datetime field in the where part.
>This is not a foxpro database, so dtos will not work
>
>
>example
>q = sqlconnect("testa")
>=sqlexec(q,"select * from test where newdatet>"+??? ,"Mycursor")