Solved

Easy One!!! Add 15 days to this date

Posted on 2002-07-23
7
146 Views
Last Modified: 2013-12-24
I have a line:

<cfset querydate = #Month(Now())#/1/#Year(Now())#>

how do i add 15 days to it
0
Comment
Question by:jeffmace
  • 4
  • 3
7 Comments
 
LVL 5

Expert Comment

by:Yog
ID: 7172218
<cfoutput>
#DateAdd('D', '15', '#querydate#')#
</cfoutput>
0
 

Author Comment

by:jeffmace
ID: 7172234
Is this the best way to get the current month and year while always have 1 as the date?

<cfset querydate = #Month(Now())#/1/#Year(Now())#>
0
 

Author Comment

by:jeffmace
ID: 7172245
If I do this:

<cfset querydate = #Month(Now())#/1/#Year(Now())#>
#DateFormat(querydate, 'mmmm d, yyyy')#

It comes out as:
December 30, 1899
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 5

Accepted Solution

by:
Yog earned 150 total points
ID: 7172330
try CREATEDATE (year, month, day)

<cfset querydate = createdate(#Year(Now())#, #Month(Now())#, 1)>
<Cfoutput>
#Dateformat(format required)#
</cfoutput>
0
 

Author Comment

by:jeffmace
ID: 7172349
If I do this:

<cfset querydate = #Month(Now())#/1/#Year(Now())#>
#DateFormat(querydate, 'mmmm d, yyyy')#

It comes out as:
December 30, 1899
0
 

Author Comment

by:jeffmace
ID: 7172354
Thanks for your help.. I increased the points for you for taking the time.
0
 
LVL 5

Expert Comment

by:Yog
ID: 7172823
Jeff,

Thank you for the points, did it work. As such 100 pts are normal here, you dont have to spend more points for simple questions. if you dont have points and need help anytime, feel free to mail me at yog_23@hotmail.com :)

cheers.
yog
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now