CurrentStartofDay function returns the start of day time stamp depending on the attribute type. for e.g. if the attribute is of type Generalized Time it will return the timestamp in Generalized Time format, if the attribute is of type Nano 100 seconds it will return the timestamp in Nano 100 format etc.
Syntax:
CurrentStartofDay
CurrentStartofDay - (n) days
CurrentStartofDay - (n) months
CurrentStartofDay - (n) years
CurrentStartofDay - (n) hours
CurrentStartofDay - (n) minutes
CurrentStartofDay - (n) seconds
where n is the number, for e.g CurrentStartofDay-30 days
CurrentStartofDay supports both select and update statements.
Examples:
Select Statement Examples using CurrentStartofDay
|
Query |
Search For |
|
SELECT
FROM OU=Chicago,OU=US,DC=LDAPSoft where badPasswordTime >=
CurrentStartofDay - 8 days |
To find out all the entries entered a bad password from the start of current day to the start of current day - 8 days |
|
SELECT FROM OU=Chicago,OU=US,DC=LDAPSoft where
createTimeStamp >= CurrentStartofDay - 8 days |
To find out all the entries created from the start of current day to the start of current day - 8 days |
|
SELECT FROM OU=Chicago,OU=US,DC=LDAPSoft where objectCategory='Person' and objectClass='User' and lockoutTime<= CurrentStartofDay - 8 days and lockoutTime!=0 subtreescope |
To find out all user entries with lockout time less then equal to the start of current day to the start of current day - 8 days |
Update Statement Examples using CurrentStartofDay
|
Query |
Results |
|
UPDATE
cn=testuser4,ou=testusers,o=stooges set description=
CurrentStartofDay -7 days |
Update description atribute of cn=testuser4,ou=testusers,o=stooges with CurrentStartofDay -7 days, the attribute must be of type timestamp or you will get an error.
|
|
UPDATE ou=testusers,o=stooges set description=
CurrentStartofDay -7 days |
Update description attribute all entries in container ou=testusers,o=stooges with CurrentStartofDay -7 days, the attribute must be of type timestamp or you will get an error. |
Related Links:
| LDAP Admin Tool Home Page | |