S
Sargas Atum
Hi all,
I am trying to get the field "lastLogon" out of ActiveDirectory.
It should be trivial I thought, but it is not, as I have experienced.
private DataRow FillDataRow( DataRow dataRow, PropertyValueCollection
property , string columnName )
{
if( columnName.Equals("Last Login") && property.Value != null )
{
dataRow[columnName] = property[0];
}
}
I dont have any problems to get all string data from
PropertyValueCollection.
But how do I convert property[0] to DateTime. ( Type of the Object is
System.__ComObject ) thats at least what I know about.
I dont find any example on the net.
thx
a.s.
I am trying to get the field "lastLogon" out of ActiveDirectory.
It should be trivial I thought, but it is not, as I have experienced.
private DataRow FillDataRow( DataRow dataRow, PropertyValueCollection
property , string columnName )
{
if( columnName.Equals("Last Login") && property.Value != null )
{
dataRow[columnName] = property[0];
}
}
I dont have any problems to get all string data from
PropertyValueCollection.
But how do I convert property[0] to DateTime. ( Type of the Object is
System.__ComObject ) thats at least what I know about.
I dont find any example on the net.
thx
a.s.