[Gambas-user] date syntax

ron ronstk at ...239...
Fri Apr 9 18:11:57 CEST 2004


On Friday 09 April 2004 19:52, Jack wrote:
> dte = Date(dte)
>
> But i have a message "Invalid Date" .
> Yet, if i write PRINT DATE(2004,04,09) in a console, i have no error and
> the answer is 2004,04,09

The dte you have build is a string
The Date however expect 3 integers

Try next without the 
dte = (Left(dte,4) & "," & Mid(dte,5,2) & "," &Right(dte,2)) line

print DATE(Cint( Left$(dte,4) ),Cint( Mid$(dte,5,2) ),Cint( Right$(dte,2) ) )

Ron




More information about the User mailing list