• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Creating a dynamic list

Community Beginner ,
Sep 28, 2006 Sep 28, 2006

Copy link to clipboard

Copied

Need some help. I'm trying to create a pull down menu that will populate itself with all dates between a start and stop date
I provide.

For example:

Start Date is 10/01/06
End Date is 10/05/06

The pull-down menu should provide the following date options:

10/01/06
10/02/06
10/03/06
10/04/06
10/05/06

I can do this when querying a table, but I can't seem to use the date function to build it dynamically. Note, I'm using
CF version 5 on the server so any new features on CF7 are not available to me.

Any help will be greatly appreciated. Working on short timeline.

Thanks.
TOPICS
Advanced techniques

Views

177

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Sep 28, 2006 Sep 28, 2006
dempster,

Not sure how to use dateadd, but the conditional loop worked. It is now giving me the list of days. The select part should be easy.

Thanks for your help.

Votes

Translate

Translate
Contributor ,
Sep 28, 2006 Sep 28, 2006

Copy link to clipboard

Copied

If you have a starting and ending date as date objects, you can use DateAdd to increment a day at a time.

You can then use CFLOOP with a conditional to keep doing this until you get to the end date. WIthin the loop, you create your select options.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 28, 2006 Sep 28, 2006

Copy link to clipboard

Copied

LATEST
dempster,

Not sure how to use dateadd, but the conditional loop worked. It is now giving me the list of days. The select part should be easy.

Thanks for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation