DtaeFunction

I have a simple tracking system that allows my clients to create records for their customers.

each record has an opening date and closing date. they are supposed to close tickets within 3 days, and they want a report to show all the records that didn't close in 3 days.

-J' I need take into account weekends and holidays and other leave random. for now, I would just be happy if I could account for the days of weekend. I can always store the days of vacation/random in the table and do a number of records and use DateAdd to subtract one additional day of my final statement.

so if I have an opening and a closing date, I have the code to determine the number of days between two dates, but how to avoid weekend days if the date range includes?

example: opening date is Friday and the closing date is Tuesday.

my code so far:

< = cfoutput query "myquery >"

< cfset $numberofdays = #dateDiff ("d", myquery.open_dt, myquery.close_dt) # >

Opening date: #open_dt #.
Closing date: #close_dt #.
Period: (#numberofDays #)

< / cfoutput >

Depending on your needs, you can store all the dates in a table. It gives you the flexibility to define things like exercise, etc. For your specific needs, you may have a working_day field that has values of 0 or 1.

Tags: ColdFusion

Similar Questions

Maybe you are looking for