Unless you want to add up the number of days from a specific date, this is
not logical, as days in years and months can vary.
If it's from a date like today, then:
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:3
>>I need to convert those values to days and add them up.
Ok, but to add them up to WHICH date ?
Or do you consider every month to be 30 days and every year to be 365
days in general?
If yes, then just use dateAdd ("d", form.years*365 + form.months*30 +
form.days, dateToBeAdded)
~~~
> No, what I need is for example, when if a user selects
> 2 years (from the years dropdown box) 2 months ( 2 days
> from the months dropdown box) and 2 days (from the days
> dropdown box then I need to convert those values to days
> and add them up. Then that added value will be used with
> a
om
Great advertising can't be either/or... It must be &.
-Original Message-
From: Robert Harrison [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2008 3:07 PM
To: CF-Talk
Subject: RE: Please Help..Confused
If you mean X years, Y months, and Z days from NOW:
This will g
If you mean X years, Y months, and Z days from NOW:
This will give you a new date that is x years, Y months, and Z days in the
future from now.
If you're calculating from a different date, change Now() to the start date.
If you're subtracting to find a past date, change the values to negati
>>I should have clarified that I am not passing a date such as
mm/dd/. The year dropdown contains the values 1-5 that the user can
select, the month is 1-11, and the days are 1-30. What I am trying to do
is for example, when if a user selects 2 years 2 months 2 days then I
need to convert
In order to get the number of days in (for example) 2 years, 2 months
and 2 days, you can do one of the following.
1. Assume a year has 365 days & a month has 30 (It doesn't and this will
not work correctly for your situation)
2. Use a start date. This is preferable since years, months and days
>On Tue, Sep 2, 2008 at 11:29 AM, Laurie Smith <[EMAIL PROTECTED]>wrote:
>
>
>
>but... but... some months have a different number of days than others :)
>
>if that's your desired result, you'll really need to capture a start date
>(and an end date)
>
>--
>A byte walks into a bar and orders a pint.
On Tue, Sep 2, 2008 at 11:37 AM, Laurie Smith <[EMAIL PROTECTED]>wrote:
> >On Tue, Sep 2, 2008 at 11:29 AM, Laurie Smith <[EMAIL PROTECTED]
> >wrote:
> >
> >
> >
> >but... but... some months have a different number of days than others :)
> >
> >if that's your desired result, you'll really need to
>Can you explain to goal a little bit... I can see a few uses for such data.
>
>For example, is the goal of the date input something like, "I need to rent a
>house for... 2 years, 3 months and 11 days"
>
>And then you need to calculate what the end date would be starting at Now()?
>
>
>=]
>
>
>--
If you want the current date to be your starting point, and you want
them to select a date in the future using your dropdowns, you'd do this:
Essentially, if the user selected 2 years, 3 months and 15 days, the
newDate would be 12/17/2010 which is 836 days away.
Hope that helps. If not,
Can you explain to goal a little bit... I can see a few uses for such data.
For example, is the goal of the date input something like, "I need to rent a
house for... 2 years, 3 months and 11 days"
And then you need to calculate what the end date would be starting at Now()?
=]
--
Alan Rother
On Tue, Sep 2, 2008 at 11:29 AM, Laurie Smith <[EMAIL PROTECTED]>wrote:
> > I have 3 drop-down boxes for:
> > Years
> > Months
> > Days
> >
> > I need to combine the values for all 3 and convert to days so I can
> > use the total number of days with DateDiff...Any suggestions would be
> > greatly
> I have 3 drop-down boxes for:
> Years
> Months
> Days
>
> I need to combine the values for all 3 and convert to days so I can
> use the total number of days with DateDiff...Any suggestions would be
> greatly appreciated. Thanks
I should have clarified that I am not passing a date such as mm/
ublication >> Website Magazine
> http://www.websitemagazine.com/referrals/?id=51344&f=text2
> Don't forget to answer the survey questions, it's a 10 second task ,
> a very small request for access to this incredible resource.
>
>
> ::-Original Message
rvey questions, it's a 10 second task ,
a very small request for access to this incredible resource.
::-Original Message-
::From: Laurie Smith [mailto:[EMAIL PROTECTED]
::Sent: Tuesday, September 02, 2008 10:01 AM
::To: CF-Talk
::Subject: Please Help..Confused
::
::I have 3 drop-d
I have 3 drop-down boxes for:
Years
Months
Days
I need to combine the values for all 3 and convert to days so I can use the
total number of days with DateDiff...Any suggestions would be greatly
appreciated. Thanks
~|
AdobeĀ® Co
17 matches
Mail list logo