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

dateadd function

Guest
Mar 19, 2007 Mar 19, 2007

Copy link to clipboard

Copied

Hi i am using date add function, looping through form values, but i have one problem,

the orginal date in the loop ie

if i select date 10/12/2007 and
a frequency of ww
and 2 cycles

my output is 17/12/2007, 24/12/2007

so i need the orginal to be outputted aswell?

<cfset startday = '#form.SMS_Date#'>

<CFLOOP INDEX="cnt" FROM="1" TO="#form.cycles#">
<CFSET nextday = DateAdd("#form.Frequency#", 1, startday)>
<CFSET startday = '#DateFormat(nextday, "dd/mm/yyyy")#'>
TOPICS
Advanced techniques

Views

332

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 Expert , Apr 07, 2007 Apr 07, 2007
> i need the orginal to be outputted aswell

FROM="0"

Votes

Translate

Translate
LEGEND ,
Mar 19, 2007 Mar 19, 2007

Copy link to clipboard

Copied

Output it before you start your loop.

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
Mar 19, 2007 Mar 19, 2007

Copy link to clipboard

Copied

df

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 Expert ,
Apr 07, 2007 Apr 07, 2007

Copy link to clipboard

Copied

LATEST
> i need the orginal to be outputted aswell

FROM="0"

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