Skip to main content

Hi all,

 

I'm trying to calculate throughput time between and "activity" and "today" timestamps by excluding Sunday. First, I tried it with using DATEDIFF function like that:

 

DATEDIFF (HH, PU_LAST ("cases",

"activities"."event_time"

),

MINUTE_NOW())

 

But in this version, I cannot exclude Sunday as you can see.

 

 

Once I tried to do it with CALC_THROUGHPUT function as below:

 

CALC_THROUGHPUT ( FIRST_OCCURRENCE R 'Order placed' ] TO CASE_END ,

REMAP_TIMESTAMPS ( "activities"."event_time" , HOURS,

WEEKDAY_CALENDAR ( MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY ) ) )

Now, I can only calculate the time until last event timestamps, not until now since I cannot use any DateTime_constant (TODAY, MINUTE_NOW, etc.) in this formula .

 

Do you have any suggestions/solutions for such cases? Many thanks in advance for the answers :)

Hi Ugurcan,

Try this:

 

REMAP_TIMESTAMPS ( "TimestampTable"."DateColumn1" , DAYS , WEEKDAY_CALENDAR ( MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY) ) 

- REMAP_TIMESTAMPS ( today() , DAYS , WEEKDAY_CALENDAR ( MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY ) )

 

Here’s more information on the functions used: REMAP_TIMESTAMPS, WEEKDAY_CALENDAR


Reply