views:

60

answers:

1

I have a table with a field name "StartDateTime" of type "DateTime". I want to do a query where those fields are null.

In the table browser, I see these fields as " 00:00:00", where non-empty fields are like "2010-09-14 00:00:00".

I tried using without success:

this.query().dataSourceTable(tableNum(smmActivities)).addRange(fieldNum(smmActivities,DataAreaId)).
                value(strFmt('(%1!=%2)',
                fieldStr(smmActivities, StartDateTime),
                date2strxpp(datenull())));

date2strxpp(datenull()) returns 1900-01-01. So I presumes that's why it's not working. I thinkI need to find a date2strxpp that return '00:00:00' in a datetime format. Any suggestions?

+1  A: 

Simpler than that:

this.query().dataSourceTable(tableNum(smmActivities)).addRange(fieldNum(smmActivities,StartDateTime)).value(SysQuery::valueEmptyString());

Or in a user range: "" (two quotes)

Jan B. Kjeldsen

related questions