Subject Re: DBF level 4 to 7 Problem
From Mervyn Bick <invalid@invalid.invalid>
Date Tue, 14 Mar 2017 22:44:43 +0200
Newsgroups dbase.getting-started
Attachment(s) test_null_fields.prg

On 2017-03-14 7:28 PM, Akshat Kapoor wrote:

>
> for date type fields you can use ctod("  .  .    ") // for date format
> dd.mm.yyyy
> adjust the spaces according to your date format.
>

Neither this nor {} nor {00/00/00} replaces a null value with a blank
date value/

The only way I've been able to find that works is to use
{0001/0001/0001}  It looks peculiar but it creates the date 0001/01/01
no matter what the date format is set to.

A little program illustrating this is attached.

> if the field name is continue and it is null
> then
> ?continue = true
> ?continue = false
> both will return false

The two print statement will return false if continue contains a date or
a null value.

    A date is not equal to true so the comparison returns false
    A date is not equal to false so the comparison returns false
    NULL is not equal to true so the comparison returns false
    NULL is not equal to false so the comparison returns false

Mervyn.