Welcome to Dream.In.Code
Getting Help is Easy!

Join 107,400 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,155 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Coldfusion Report Builder

 
Reply to this topicStart new topic

Coldfusion Report Builder, How to display date?

eera
post 14 Jan, 2008 - 08:23 PM
Post #1


New D.I.C Head

*
Joined: 7 Jan, 2008
Posts: 3

Hello,

please help me, i want to display a date using coldfusion report builder. The date that i want to display has a condition which is:
-display a date 3 days from today except saturday and sunday.

I'm using below statement to display the date, but the output always in condition 1. It's anything wrong in my statement?

<cfif (IsDate(ToString(DateFormat(Now(),"dddd/ddmmyy"))) EQ (IsDate(ToString("Monday/ddmmyy"))) OR (IsDate(ToString(DateFormat (Now(),"dddd/ddmmyy"))) EQ (IsDate(ToString("Tuesday/ddmmyy")))) OR (IsDate(ToString(DateFormat (Now(),"dddd/ddmmyy"))) EQ (IsDate(ToString("Sunday/ddmmyy")))))>

DateFormat (3 + Now (), "dddd/dd")

<cfelseif (IsDate(ToString(DateFormat (Now(),"dddd/ddmmyy"))) EQ (IsDate(ToString("Wednesday/ddmmyy"))) OR (IsDate(ToString(DateFormat (Now(),"dddd/ddmmyy"))) EQ (IsDate(ToString("Thursday/ddmmyy")))) OR (IsDate(ToString(DateFormat (Now(),"dddd/ddmmyy"))) EQ (IsDate(ToString("Friday/ddmmyy")))))>

DateFormat (5 + Now (), "dddd/dd")

<cfelse>
DateFormat (4 + Now (), "dddd/dd")
</cfif>


Please help me....

This post has been edited by eera: 14 Jan, 2008 - 09:02 PM
User is offlineProfile CardPM

Go to the top of the page


eera
post 16 Jan, 2008 - 02:52 AM
Post #2


New D.I.C Head

*
Joined: 7 Jan, 2008
Posts: 3

Hello,

I've already solve the problem. The coding is:

<cfif (DayOfWeekAsString(DayOfWeek(Now())) EQ DayOfWeekAsString(2) OR (DayOfWeekAsString(DayOfWeek(Now())) EQ DayOfWeekAsString(3)) OR (DayOfWeekAsString(DayOfWeek(Now())) EQ DayOfWeekAsString(1)))>
DateFormat (3 + Now (), "ddmmyy")
<cfelseif (DayOfWeekAsString(DayOfWeek(Now())) EQ DayOfWeekAsString(7))>
DateFormat (4 + Now (), "ddmmyy")
<cfelse>
DateFormat (5 + Now (), "ddmmyy")
</cfif>

-That is 1 (Sunday) - 7 (Saturday).

User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/28/08 04:38PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month