[V4RB] 3 simple [?] questions
Pedro fp
lists at pedro.Net.au
Thu Feb 27 05:50:55 CST 2003
G'day Keith et al
Actually I am using a cursor, that's what 'data' in my code is. It's
named so because it's the data displayed by the window that it's a
property of. That cursor, being a window property, is also the reason
for my question about killing cursors.
Thanks to all for your helpful answers both now & all other times I've
posted questions.
On Thursday, February 27, 2003, at 01:35 AM, Keith DeLong wrote:
>> 2. Dates. I'd like to display dates as a REALbasic ShortDate because
>> that formats the date according to the users system preferences.
>> Currently I'm doing that with the following ...
>>
>> d = new date
>> d.year = data.DateField( "dateAdded" ).year
>> d.month = data.DateField( "dateAdded" ).month
>> d.day = data.DateField( "dateAdded" ).day
>> efDateAdded.text = d.shortDate
>>
>> Can anyone suggest a more concise approach?
>
> I use doubles instead of dates in V4RB... For base object, I'd use:
>
> d = new date
> d.totalseconds = data.MyDateDouble.value
>
> It's really much better to use cursors:
>
> d.totalseconds = cursor.doublefield("MyDate").value
> cursor.add //or cursor.update
Cheers, Pedro :-)
Web: <http://www.pedro.net.au> PGP Key ID: 387CD96F
Instant messaging... AIM: bandidoOfOz ICQ: 27671678 Jabber: pedrofp
MSN: mail at pedro.net.au Yahoo: pedro_fp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Good actions ennoble us, and we are the sons of our own deeds."
Miguel de Cervantes
More information about the Valentina
mailing list