[Gambas-user] More Date woes

Jeffrey Cobb maillists.gurulounge at ...626...
Fri Mar 14 03:53:49 CET 2008


As far as displaying is concerned I use the following in one of my
projects:
lblClock.Text = Format(Now, "ddd (mm/dd/yyyy) - h:nn:ss")

The Format function takes a number of params specified here:
http://gambasdoc.org/help/lang/format

As far as input.  That topic came up not too long ago in the mailing
list.  I don't know of a way to specifiy the input format for a textbox
other than do write a module yourself.

Jeff

On Thu, 2008-03-13 at 23:53 +0000, Richard wrote:
> I have hit another snag with date handling while working on the problem 
> referred to above (see "Strange problem with Date Time and ValueBox").
> 
> I use long form dates. I have done it for years. I like it that way. Gambas2 
> does not provide a mechanism (that I can find) to specify a default date 
> format. When I set a ValueBox widget to display a date it is Gambas that 
> decides whether it should be 13/03/2008 or 13/03/08 which seems to be 
> governed by how I set the value.
> 
> If I use:
> 
>     StartDateBox.value = Now
> 
> then I get a 4 digit year.
> 
> If I use:
> 
>     StartDateBox2.Value = Date(Now)
> 
> then I get a 2 digit year.
> 
> Does anyone know of a way to define a format for a ValueBox which will work 
> for both input and display?
> 
> Richard
> 






More information about the User mailing list