I'm missing something.  If you're altering the date, it seems you'd already
have a date that you'd just overwrite the current value with.

UPDATE table SET
    startDate = #myNewStartDate#
WHERE .....

or if you only have an offset, all the DBs that I've ever used have
something equivalent to a dateAdd function that you can use directly:

UPDATE table SET
    startDate = date_add(startDate, INTERVAL #minuteOffset# MINUTE)
WHERE ...

That's MySQL syntax, likely not what you'd want.  Have to check the docs for
your DB.
  -----Original Message-----
  From: Craig Earls [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, November 18, 2003 4:49 PM
  To: CF-Talk
  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 [mailto:[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