Java. The only way to change it is to create a new one based on the
old with with the modifications you need. The answer to your last
question is that it doesn't really matter. I am just so new to CF
that I thought I was missing some simple method of changing the
properties of a date object. It didn't make sense to me that there
would be a dateAdd() function, but no "set" functions.
On Tue, 18 Nov 2003 19:06:11 -0700, you wrote:
>Why do you think dates are immutable, and even if they are, why does it matter?
>
>----- Original Message -----
>From: Craig Earls <[EMAIL PROTECTED]>
>Date: Tuesday, November 18, 2003 6:58 pm
>Subject: Re: Altering Date Objects?
>
>> Thanks, as it turns out that is what I am doing in a way. So I have
>> just wasted a lot of bandwidth. I was hoping someone was going to tell
>> me I had missed something big about accessing properties in CF
>> objects. But it looks like dates really are immutable.
>>
>> On Tue, 18 Nov 2003 17:46:00 -0800, you wrote:
>>
>> >Ah, HA!
>> >
>> >I see three solutions, given that after submitting the second
>> page you'll
>> >have 4 pieces of info: a date (myDate), an hours value (hr), a
>> minutes value
>> >(min), and a seconds value (sec).
>> >
>> >1) myDate = createDate(year(myDate), month(myDate), day(myDate), hr,
>> >min,sec);
>> >2) myDate = dateAdd(myDate, "h", hr);
>> > myDate = dateAdd(myDate, "n", min);
>> > myDate = dateAdd(myDate, "s", sec);
>> >3) myDate = parseDate(dateFormat(myDate, "mm/dd/yyyy") & "
>> >#hr#:#min#:#sec#");
>> >
>> >I think the first is best, but thats just opinion.
>> > -----Original Message-----
>> > From: Craig Earls [EMAIL PROTECTED]
>> > Sent: Tuesday, November 18, 2003 5:22 PM
>> > To: CF-Talk
>> > 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]

