Clarity

  • 1.  COP_CALC_FINISH_FCT Function

    Posted Nov 14, 2009 07:10 AM
    Who can tell me a story about the COP_CALC_FINISH_FCT Function? Looks like smart people never bring back a finish date without running it through this function  first. I would like to be a smart people too.  What does it do? Is something wrong with just pulling back finish from  a table?


  • 2.  Re: COP_CALC_FINISH_FCT Function
    Best Answer

    Posted Nov 15, 2009 08:51 AM
      |   view attached
    The function deducts 1 days from a finish date IF the time  portion  is 00:00:00       Why: Midnight is a ‘point’ with NO duration, Midnight is actually 2 things:    - The end of a day  - The start of the next day     Or, for the visual thinkers (see image) ….
    the  black arrow perspective of midnight is different to the  white arrow perspective of the same yellow point in time   Clarity treats FINISH datetime fields as “the end of the dayâ€?      So the finish of a day could be  2009-10-08:24:00       But databases don’t store 24:00, they store 00:00 instead    SO    The end of 2009-10- 08 is stored as 2009-10- 09 :00:00 (because they are actually the same point in time)         HENCE, you will often find you need to do -1 on a datetime IF the time of day is 00:00 AND the field is a FINISH         [ & also , if a datetime holds anything except “00:00â€? in the time portion then you do not need to -1, because the  black view and  white view result in the same date ]        Clear as mud I know, I have tried to explain this many times and never been able to make it simple.


  • 3.  Re: COP_CALC_FINISH_FCT Function

    Posted Nov 15, 2009 11:43 AM
    Thanks Paul.  That aparently is how Clarity handles time period finish dates, which are a stubling stone for every report desiger the first time.With the 00:00:00 the database values are one day later thatn what is displayed in the GUI.  Marti K:  


  • 4.  Re: COP_CALC_FINISH_FCT Function

    Posted Nov 17, 2009 12:00 PM
    Hi Paul, Marti. That explains it crystal clear.  Thanks!