[Gambas-user] Probelm with Date

Brant Wells dafyre at ...43...
Wed Jun 22 23:42:05 CEST 2005


As I write this email, I am away from any usable Gambas installation at the moment, however, in your code, you could do something like the following (watch out for syntax errors from me!)
 
dim date as DATE
dim tDate as long
 
date=Now()
 
tDate=format(date,"0") 'Or however you convert something to numbers...
 
tdate=tdate-1
 
date=format(tdate,"mm/dd/yyyy")
 
 
I know that code would work in VB... but I've not used the format() function in Gambas in a while, so I'm not sure if that would get it or not... 
 
HTH
~Brant
 


nando <nando_f at ...951...> wrote:
That is my problem too.
I asked Benoit about the underlying values with no clear answer.
In VB, date/time is really a double (8B) with the value of 1 (one)
being the difference of one day....so 0.5 is half a day...etc.

I really would like to know the underlying data type
or bit format
I do not know in Gambas...I really wish I did.

-Fernando


---------- Original Message -----------
From: PaquitoSoft 
To: gambas-user at lists.sourceforge.net
Sent: Wed, 22 Jun 2005 23:18:39 +0200
Subject: [Gambas-user] Probelm with Date

> Hi all!
> 
> I'm wondering about Date data type.
> Is there anyway to do something like this???
> 
> DIM date as DATE
> 
> date = Now()
> PRINT "Yesterday -> " & (date - 1)
> 
> I kwon you can do in VB, but in Gambas it says that they are
> incompatible types (of course they are...)
> 
> Any answer??
> 
> Thanks a lot
> -- 
> El tiempo es un gran profesor. Desafortunadamente, mata a todos sus
> alumnos.
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration 
> Strategies from IBM. Find simple to follow Roadmaps, straightforward 
> articles, informative Webcasts and more! Get everything you need to 
> get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

		
---------------------------------
Yahoo! Sports
 Rekindle the Rivalries. Sign up for Fantasy Football
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20050622/f99c0e11/attachment.html>


More information about the User mailing list