gettingstarted
[Top] [All Lists]

Re: time storage

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: time storage
From: Phil M <phil at mobleybros dot com>
Date: Sat, 28 Jan 2006 12:03:54 -0800
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <60 dot 65e7461c dot 310d25d9 at aol dot com>
On Jan 28, 2006, at 11:54 AM, GAmoore at aol dot com wrote:

I want to store the time and date of something. A database can store a date and a time type field which is fine. I see that a date type of data willl store both too (e.g. d.shortdate or d.shorttime). But how can I put a date in a class? I can have integer, date, single, and string data and so forth, but there is no 'time' type of data field to put in a class? It seems to be the missing
link here.

REALbasic dates objects always have a date, you cannot just assign the time value. However, the actual date really doesn't matter, so you can make it anything you want. For example:

   Dim d As New Date     // sets the date to right now (day and time)
   d.Hour = 11
   d.Minute = 0
   d.Second = 0

   MsgBox d.ShortTime    // outputs "11:00 AM

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>