I'm trying to use DateDiff to determine if a call has been logged by 10:00
am on the third weekday. I can use 'd' to get the third day but I cannot
count Saturday or Sunday.

For instance, if your collection day is Tuesday and your item was not
collected, you must call before 10:00am Friday, otherwise you have to wait
until your next collection day.  This does not include Saturdays or Sundays

<cfset call_logged = Createdate(04,05,21)> <!--- friday --->
<cfset today = CreateDate(04,05,25)> <!--- tuesday --->

<cfset call_logged = Createdate(04,05,21)> <!--- friday --->
<cfset today = CreateDate(04,05,25)> <!--- tuesday --->

<cfoutput>
call_logged_date: #call_logged#<br><br>
today: #today#<br>
<hr>

<!--- if it's before 10:00 on 3rd weekday code should display --->
<cfif Abs(DateDiff("d", call_logged, today)) lte 3 AND TimeFormat(Now()) lt
CreateTime(10,00,00)>
Display record: it's before 10:00 am on the third weekday.
</cfif>

</cfoutput>

Thanks,
Shannon
[EMAIL PROTECTED]
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to