Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mask for 90 days from now 1

Status
Not open for further replies.

harrymossman

Technical User
Joined
Sep 5, 2002
Messages
255
Location
US
It seems like this must have been answered before but I'm not finding it in the posts or FAQs.

Code:
<cfoutput>#DateFormat(Now()+90)#</cfoutput>
gives me 08-Sep-04. I would like September 8, 2004. But can't seem to figure out how to use a mask to do it.
 
Try this:
Code:
<cfset DisplayDate =  DateFormat(Now()+90)>

<cfset DisplayDate = "#DateFormat('#DisplayDate#', 'mmmm')# #DateFormat('#DisplayDate#', 'dd')#, #DateFormat('#DisplayDate#', 'yyyy')#">

<cfoutput>
#DisplayDate#
</cfoutput>




Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Thanks. I never would have figured that out on my own.
 
No problem, glad I could help.



Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Curious.. is there a reason for seperating the dateformats like that?

<cfset DisplayDate = "#DateFormat('#DisplayDate#', 'mmmm')# #DateFormat('#DisplayDate#', 'dd')#, #DateFormat('#DisplayDate#', 'yyyy')#">

could be

<cfset DisplayDate=DateFormat(DisplayDate,"mmmm dd, yyyy")>

A few reasons..

One, I've read off MM's website that each pound sign slows down the page load the tiniest fraction.. but it still does.

Two, repeatedly calling the same function makes little or no sense.

Just my thoughts, but I'm glad Ecobb was able to help.

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Oh...well, yeah...IF you want to do it the easy way! :~/
Thanks for pointing that out! [thumbsup2]





Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top