Clarity

  • 1.  Use sysdate(current date) in datediff function of 'calculated attribute'

    Posted Sep 19, 2008 08:22 AM
    Has anyone used Datediff function with current date as one of the argument in the 'calculated attribute'?  In Clarity>Objects>Attribute, choose the datatype as 'Calculated' and build calculated attribute which includes current date as one of the argument.  Example:  DateDiff( sysdate ,prstart,"Day")  Your help is greatly appreciated.  Thanks-Venkitta


  • 2.  Re: Use sysdate(current date) in datediff function of 'calculated attribut

    Posted Sep 23, 2008 01:58 PM
    Hi venkitta. To use the current date in a calculated attrubute, use the Now() function.  From your example, it appears as if you're trying to create a calculated attribute on the Task object that will count days from the Task start. Try this: DateDiff(prstart,Now(),"Day")  HTH


  • 3.  RE: Re: Use sysdate(current date) in datediff function of 'calculated

    Posted Aug 04, 2010 11:49 AM
    Hi,

    An old thread, but were you successful?

    I'm trying to determine the difference between two risk date fields..

    DateDiff(day, target_resolve_date, now())

    I've tried every permutation of this statement and I can't get it to work! Frustrated, hope someone can help!

    Kind Regards


  • 4.  RE: Re: Use sysdate(current date) in datediff function of 'calculated

    Posted Aug 04, 2010 04:17 PM
    Hi Nock. Try DateDiff(target_resolve_date,Now(),"Day")


  • 5.  RE: Re: Use sysdate(current date) in datediff function of 'calculated

    Posted Aug 09, 2010 11:53 AM
    Solved!

    Many thanks Rob.

    (I note 1500 views too, seems to be a topic of interest!)


  • 6.  RE: Re: Use sysdate(current date) in datediff function of 'calculated
    Best Answer

    Posted Aug 23, 2011 04:43 PM
    I needed to simulate a Boolean value for use in a List Filter view, and used this calculated attribute to get the value:
    Min(Max(DateDiff(target_resolve_date,Now(),"Day"),0,1)
    A return value of 1 indicates that the target resolve date is prior to the present date, and a return value of 0 indicates that the target resolve date is later than the present date.

    Rob.Ensinger wrote:

    Hi Nock. Try DateDiff(target_resolve_date,Now(),"Day")


  • 7.  RE: Re: Use sysdate(current date) in datediff function of 'calculated

    Posted Dec 18, 2012 07:45 AM
    I know it is an old thread but I think there is minor mistake and the correct formula is:
    Min(Max(DateDiff(target_resolve_date,Now(),"Day"),0),1)

    mphelan wrote:

    I needed to simulate a Boolean value for use in a List Filter view, and used this calculated attribute to get the value:
    Min(Max(DateDiff(target_resolve_date,Now(),"Day"),0,1)
    A return value of 1 indicates that the target resolve date is prior to the present date, and a return value of 0 indicates that the target resolve date is later than the present date.

    Rob.Ensinger wrote:

    Hi Nock. Try DateDiff(target_resolve_date,Now(),"Day")