It works as expected. Thanks Benoit. The comment at http://gambasdoc.org/help/cat/constant should be revised where it says: gb.GeneralDate Write a date only if the date and time value has a date part, and write a time only if it has a date part.