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

How to Post Listings only on Tuesdays, Expire...

Guest
Jan 18, 2007 Jan 18, 2007

Copy link to clipboard

Copied

Hi,

I can't figure how to do the following: Users can create a listing at anytime, but the listing won't start displaying online until the upcoming Tuesday (always Tuesday). The listings expire according to how many weeks the user selected. So, for example: The listing was created Sunday, it displays on Tuesday and runs for 6 weeks (42 days). I don't want a user to select from a calendar, only number of weeks.

Any help would be greatly appreciated.

Cheers and sincerely,

William
TOPICS
Advanced techniques

Views

294

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
LEGEND ,
Jan 18, 2007 Jan 18, 2007

Copy link to clipboard

Copied

Look at the date and time functions, particularly dateAdd(). I suspect
you will find this pretty easy to do with these functions.

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
New Here ,
Jan 18, 2007 Jan 18, 2007

Copy link to clipboard

Copied

I suggest you have a good troll through the ColdFusion date functions.

http://livedocs.macromedia.com/coldfusion/6/CFML_Reference/functions-pt09.htm

You may find DayOfWeek() especially useful.

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
Guest
Jan 18, 2007 Jan 18, 2007

Copy link to clipboard

Copied

LATEST
Hi,

Thanks for the advice. I believe I'm seeing a solution now. Basically: get today's date, figure out when Tuesday is; Then get "number of weeks" from user input; then do the math; then insert final date into "expire" db field.

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