Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 88739

Elapsed time in business days?

$
0
0

Greetings

 

I am trying to get query results that would show elapsed time in business days. I have been so far unsuccessful in getting the elapsed days at all.

 

An appraiser's clock starts ticking when an order is entered in the system (order_create_date). The clock stops for the appraiser when an order is completed (order_complete_date) and the turn-around time to the client is (order_report_sent_date).

 

I attempted:

 

<cfquery name="get_client_tat" datasource="#Request.BaseDSN#">

 

SELECT order_ID, order_create_date,

      DateDiff("d", order_create_date, order_report_sent_date) AS client_tat

   FROM main_orders

   WHERE order_ID = #list_orders_all.order_ID#

</cfquery>

 

<cfquery name="get_appraiser_tat" datasource="#Request.BaseDSN#">

 

SELECT order_ID, order_create_date,

      DateDiff("d", order_create_date, order_complete_date) AS appraiser_tat

   FROM main_orders

   WHERE order_ID = #list_orders_all.order_ID#

</cfquery>

 

I simply get null results in

 

<cfloop query="list_orders_all">

 

#get_appraiser_tat.appraiser_tat# ,

#get_client_tat.client_tat#</cfloop>

 

Would it be better to <cfset get_appraiser_tat = #DateDiff('d', DateA, DateB)#> etc. or in the SQL statement, and how would one count business days only?

 

Any help would be greatly appreciated.

 

Norman


Viewing all articles
Browse latest Browse all 88739

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>