投稿済み Sun, 05 Jan 2020 06:40:07 GMT 、投稿者 Frédéric Escudero
Hi,
is it possible to search for an empty date field ?
If not, what is the XML syntax to search for a specific date ?
Here is the XML file I send with my request  (I have tried to send the date in UTC format too) :
<?xml version="1.0" encoding="utf-8"?>
<DialogExpression xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Operation="And" xmlns="http://dev.docuware.com/schema/public/services/platform">
    <Condition DBName="ATTRIBUTIONS">
        <Value>*Ecole du Sacre-Coeur*</Value>
    </Condition>
    <Condition DBName="EDITION_CAHIER_DE_TRANSMISSION">
        <Value>1900-01-01</Value>
    </Condition>
</DialogExpression>

I receive no result with that request, but I have results without the date condition.
Thanks,
Fred.
投稿済み Sun, 05 Jan 2020 21:59:24 GMT 、投稿者 Frédéric Escudero
Well, I have the answer :
- Yes, you can perform a research on an empty date field using the EMPTY() keyword (tested).
- The search date syntax is correct, my DBName wasn't ;)
投稿済み Mon, 06 Jan 2020 16:03:55 GMT 、投稿者 Joe Kaufman Bell Laboratories Inc No longer there
Frederic,

Good info! I did not know the EMPTY() keyword could be used (or else I did know a long time ago and forgot *smile*).

Just FYI for anyone else reading the thread, you can make the search be for a range of dates by simple adding a second "Value", like this:
 
<?xml version="1.0" encoding="utf-8"?>
<DialogExpression xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Operation="And" xmlns="http://dev.docuware.com/schema/public/services/platform">
    <Condition DBName="SHIP_DATE">
        <Value>2019-01-01</Value>
        <Value>2019-12-31</Value>
    </Condition>
</DialogExpression>
This is a query on a field called "SHIP_DATE", and would get everything where ship date was in 2019.

For a full date/time field, such as DWSTOREDATETIME, the XML looks like:
 
<?xml version="1.0" encoding="utf-8"?>
<DialogExpression xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Operation="And" xmlns="http://dev.docuware.com/schema/public/services/platform">
    <Condition DBName="DWSTOREDATETIME">
        <Value>2020-01-03T00:00:00</Value>
        <Value>2020-01-03T23:59:59</Value>
    </Condition>
</DialogExpression>

This would get anything stored on January 3, 2020.

Incidentally, you can use the full date/time syntax on a field that is just a "date" type and it works fine. DocuWare stores Date and DateTIme fields the same way in the database (at least in SQL Server).

Thanks,
Joe Kaufman



 

フォーラムに投稿するためにはログインが必要です。