Skip navigation
111 Views 2 Replies Latest reply: Apr 21, 2012 11:59 PM by dmshimself RSS
cdaniel Rookie 3 posts since
Dec 7, 2011

Has received 1 of 9 achievements.
Currently Being Moderated

Apr 19, 2012 7:38 PM

Querying 2 different date objects in query builder

Hi,

 

I was wondering whether it is possible to create a query using the query builder that validates one date object against another date object. For example:-

 

Indcident Due Date (custom date object) is less than indcient closed date (system landesk object).

 

I'm assuming you would need to create a crystal report or something maybe that would be this instead of using the query builder.

 

Any advice would be much appreciated.

 

Kind Regards.

.

  • KarenPeacock Employee 1,131 posts since
    Jul 29, 2008

    Has received 6 of 9 achievements.
    Currently Being Moderated
    1. Apr 20, 2012 3:03 AM (in response to cdaniel)
    Re: Querying 2 different date objects in query builder

    Hi

     

    Yes this can be done in Crystal.  Create a new formula which should be something like this:

     

    If {Due Date} < (Date Closed} then True else False

     

    Then you can use the Select Expert to only show records where the formula result is True / False as needed.  It's worth bearing in mind that your date fields actually store dates and times so if you wanted to compare dates you would need to convert them to just dates.  I think from memory you would just need to use ToDate, so for example ToDate({DueDate}).  Then you would need to make sure you also think about whether you want the formula to return True or False if the two dates are equal.

     

    Best wishes

    Karen

  • dmshimself ITSMMVPGroup 2,252 posts since
    Dec 16, 2007

    Has received 7 of 9 achievements.
    Currently Being Moderated
    2. Apr 21, 2012 11:59 PM (in response to cdaniel)
    Re: Querying 2 different date objects in query builder

    With query designer I'm afraid not.  I did raise an ER which I now cannot find which would allow the query design to use calculations.  If that were implemented you'd be able to do the sort of thing you had in mind.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 20 points
  • Helpful Answers - 10 points
LANDESK Community powered by Jive SBS® 4.5.7.1  |  Legal Notices  |  Privacy Policy  |  Icon 

TweeterOn Twitter  |  Icon FacebookOn Facebook © 2007 LANDESK Software