?
Solved

Easy One!!! Add 15 days to this date

Posted on 2002-07-23
7
Medium Priority
?
162 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 5

Accepted Solution

by:
Yog earned 600 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What You Need to Know when Searching for a Webhost Provider
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2
Suggested Courses

850 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