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
-
Request for help with my HP Designjet 130 printer
Greetings, I have owned, loved and used my printer Deskjet HP130 for sixteen years now. I do not use and would like to know if you are able to exchange for another product of your company (HP - printer, laptop or other digital material). My contact (
-
No access to Windows Update in Windows Vista safe mode with network
Since yesterday every time I connect normally to Windows Vista, the programs stop responding at random and nothing works Manager tasks even not so I am forced to close it manually, the only way that I normally use my computer is in safe mode I google
-
is there a way to clear the fax log?
Is there a way to delete / remove the fax log?
-
New PC w / continuous closures - system performance issues
I have a new PC from TigerDirect running Windows 7. I have not loaded any new software. My children have only been playing chess on it. While playing, it restarts continuously. In Event Viewer, there are several daily warnings/errors/criticism which
-
White pages when it is used in the copy of scan function
My HP Officejet pro 8000 only produces blank pages when I use the copy function on my Epson scanner. If I uncheck the preview option before printing on the printer properties, it then prints okay