Set the time using dateAdd(), like the other poster suggested.

Don't use createODBCDateTime until you're actually doing the insert.

----- Original Message -----
From: Craig Earls <[EMAIL PROTECTED]>
Date: Tuesday, November 18, 2003 6:22 pm
Subject: Re: Altering Date Objects?

> I am talking in circles, sorry.  Let me clarify the question:  I am
> ultimately going to stick a ODBCDateTime object into a database, but
> first I have to create it.  
>
> My workflow is such that the user selects the date from a widget
> (system creates the object using createDate()). On the next page (this
> is a wizard type of thing, don't get me started) the user sets the
> time of a meeting.  So now I have a date object with the actual date
> of the meeting, and I want to set the time in that date object so I
> can feed it to createODBCDateTime and stuff it into a database.
>
> On Tue, 18 Nov 2003 17:58:49 -0700, you wrote:
>
> >Databases are a persistent data store, not an object store.  So
> yes, you'd have to change the date somewhere and update the
> corresponding entry in the database (you can do these two
> operations in one SQL statement).
> >
> >----- Original Message -----
> >From: Craig Earls <[EMAIL PROTECTED]>
> >Date: Tuesday, November 18, 2003 5:49 pm
> >Subject: Re: Altering Date Objects?
> >
> >> I thought of that, but for the sake of argument let's say I am
> storing>> a date object in my DB.  If I reschedule the meeting
> then I would like
> >> to just directly alter the values, not compute an offest then add
> >> them.  Their is no copy ocntructor that I can see, so I have been
> >> creating a new datetime object using the individual properties
> of the
> >> old date object. It seems clumsy.
> >>
> >> On Tue, 18 Nov 2003 16:19:29 -0800, you wrote:
> >>
> >> >just hit it with a dateAdd() and specify "h", "n", or "s" for
> the
> >> date part.
> >> >Yes, that's an "n", not an "m".  "m" is month, "n" is minute.
> >> >
> >> >  -----Original Message-----
> >> >  From: Craig Earls [EMAIL PROTECTED]
> >> >  Sent: Tuesday, November 18, 2003 4:13 PM
> >> >  To: CF-Talk
> >> >  Subject: Altering Date Objects?
> >> >
> >> >
> >> >  I need to allow a user to specify a time and date for a
> >> meeting.  I am
> >> >  using a calendar widget to choose the date, and a few
> >> comboboxes to
> >> >  choose the time.  This brught the following question up:
> >> >
> >> >  Suppose I create a date object with CreateDate(Year, Month,
> >> Day), then
> >> >  later want to modify the time in that date object.  How
> would I do
> >> >  that?  Are date objects immutable?
> >> >
> >> >
> >> >
> >>
> >
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to