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.
Le 06/02/2012 06:44, Zach Smith a écrit :
>> gb.GeneralDate prints the date part the short way (dd/mm/yy) and prints
>> the time if it is not zero.
>
> The middle example is still inconsistent if one expects 00:00:00 to be
> a valid time, that is, midnight (12:00 AM). Also note that the format
> i
On 2/5/2012 11:44 PM, Zach Smith wrote:
> only if the time is not 00:00:00
Correction - "only if the time *is* 00:00:00"
--
Try before you buy = See our experts in action!
The most comprehensive online learning library fo
> gb.GeneralDate prints the date part the short way (dd/mm/yy) and prints
> the time if it is not zero.
The middle example is still inconsistent if one expects 00:00:00 to be
a valid time, that is, midnight (12:00 AM). Also note that the format
is mm/dd/yy only if the time is not 00:00:00. One c
Le 05/02/2012 08:40, Benoît Minisini a écrit :
> Le 03/02/2012 05:41, Zach Smith a écrit :
>> The gb.GeneralDate formatting appears to be inconsistent in the
>> handling of time 00:00:00..
>>
>> ...
>
> Actually the third formatting is inconsistent.
>
> gb.GeneralDate prints the date part the shor
Le 03/02/2012 05:41, Zach Smith a écrit :
> The gb.GeneralDate formatting appears to be inconsistent in the
> handling of time 00:00:00..
>
>
> Dim d1 As Date, d2 As Date, d3 As Date
>
> d1 = CDate("1/1/2003 00:00:00")
> d2 = CDate("1/1/2003")
> d3 = CDate("00:00:00")
>
> Print Format(d1, gb.Genera
The gb.GeneralDate formatting appears to be inconsistent in the
handling of time 00:00:00..
Dim d1 As Date, d2 As Date, d3 As Date
d1 = CDate("1/1/2003 00:00:00")
d2 = CDate("1/1/2003")
d3 = CDate("00:00:00")
Print Format(d1, gb.GeneralDate)
Print Format(d2, gb.GeneralDate)
Print Format(d3, gb.