• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "LDAP Query Syntax help"

Collapse

  • chef
    replied
    Originally posted by eek View Post
    is it in a script?

    Could the script generate the appropriate date translate it into a timestamp and put that into the ldap query.
    yes eek that's the solution, shortly pipped to the post by Doodab.

    problem solved

    ARDBC LDAP plugin vendor form lookup
    if you add the modified timestamp as a field to the vendor form and use it in a remedy query that does e.g. a set fields from the form, the plugin should do the necessary maths before retrieving the data.
    fantastic all, many thanks from preventing an ageing chef going even more senile

    Leave a comment:


  • eek
    replied
    is it in a script?

    Could the script generate the appropriate date translate it into a timestamp and put that into the ldap query.

    Leave a comment:


  • TheFaQQer
    replied
    Originally posted by chef View Post
    I am trying to construct the correct syntax for an LDAP query. At present I have

    Code:
    ldap://clientaddress.com/o=client.com?uid?sub?(&(objectclass=clientperson)(clientmetalink=ITDESK)(modifytimestamp>=20120110000000Z))
    which pulls all people records modified after 10th Jan 2012.

    This works fine, however the modifytimestamp query is fixed.

    I am trying to replace the fixed timestamp 20120110000000Z with a calculated variable of something like 'today - 3 days' using any inbuilt operators/variables LDAP has (that's the bit I can't find out).

    e.g
    Code:
    ldap://clientaddress.com/o=client.com?uid?sub?(&(objectclass=clientperson)(clientmetalink=ITDESK)(modifytimestamp>=currentDate -3 days))
    Does anyone have any ideas on the correct LDAP syntax for this? Is it even possible?
    It should be possible to do it - this example shows how to do it in VB, but it doesn't look too different from the format that you are passing in.

    Leave a comment:


  • doodab
    replied
    Check your PMs
    Last edited by doodab; 8 February 2012, 14:36.

    Leave a comment:


  • chef
    replied
    Originally posted by pmeswani View Post
    Stupid suggestion coming up. Does (currentDate - 3 days) work? (I.e. put the maths inside brackets). Also, can you pass a temporary variable to the modifytimestamp query? i.e. modifytimestamp>=notCurrentDate?
    the 'currentDate - 3 days' is simply an english description of what I'm trying to calculate, I don't think LDAP is that clever is it?

    and no, no chance to pass a temp variable, that was my first line of thought.

    Thanks for the suggestion though.

    Leave a comment:


  • pmeswani
    replied
    Originally posted by chef View Post
    I am trying to construct the correct syntax for an LDAP query. At present I have

    Code:
    ldap://clientaddress.com/o=client.com?uid?sub?(&(objectclass=clientperson)(clientmetalink=ITDESK)(modifytimestamp>=20120110000000Z))
    which pulls all people records modified after 10th Jan 2012.

    This works fine, however the modifytimestamp query is fixed.

    I am trying to replace the fixed timestamp 20120110000000Z with a calculated variable of something like 'today - 3 days' using any inbuilt operators/variables LDAP has (that's the bit I can't find out).

    e.g
    Code:
    ldap://clientaddress.com/o=client.com?uid?sub?(&(objectclass=clientperson)(clientmetalink=ITDESK)(modifytimestamp>=currentDate -3 days))
    Does anyone have any ideas on the correct LDAP syntax for this? Is it even possible?
    Stupid suggestion coming up. Does (currentDate - 3 days) work? (I.e. put the maths inside brackets). Also, can you pass a temporary variable to the modifytimestamp query? i.e. modifytimestamp>=notCurrentDate?

    Leave a comment:


  • chef
    started a topic LDAP Query Syntax help

    LDAP Query Syntax help

    I am trying to construct the correct syntax for an LDAP query. At present I have

    Code:
    ldap://clientaddress.com/o=client.com?uid?sub?(&(objectclass=clientperson)(clientmetalink=ITDESK)(modifytimestamp>=20120110000000Z))
    which pulls all people records modified after 10th Jan 2012.

    This works fine, however the modifytimestamp query is fixed.

    I am trying to replace the fixed timestamp 20120110000000Z with a calculated variable of something like 'today - 3 days' using any inbuilt operators/variables LDAP has (that's the bit I can't find out).

    e.g
    Code:
    ldap://clientaddress.com/o=client.com?uid?sub?(&(objectclass=clientperson)(clientmetalink=ITDESK)(modifytimestamp>=currentDate -3 days))
    Does anyone have any ideas on the correct LDAP syntax for this? Is it even possible?
    Last edited by chef; 8 February 2012, 14:07.

Working...
X