Hello Stephen,

tried that but somehow I end up with a date like "19.01.2038 04:14:07".

Seems I'm doing something wrong here somehow...


Greetings, Robert


-----Original Message-----
From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] 
On Behalf Of Heider, Stephen
Sent: Friday, December 22, 2006 4:19 PM
To: arslist@ARSLIST.ORG
Subject: Re: ActiveDirectory - Converting long int values ?

Robert,

If I understand your question correctly, it seems you are very close...

I retrieve the AD long int value and store it in a Remedy Decimal field.  
In the next Set Fields action divide by 10000000 and store in the same Decimal 
field.  
In the next Set Fields action set the Remedy Date/Time field to the value of 
the Decimal field.

HTH

Stephen
 

________________________________

From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] 
On Behalf Of Kern, Robert SBA
Sent: Friday, December 22, 2006 10:09 AM
To: arslist@ARSLIST.ORG
Subject: ActiveDirectory - Converting long int values ?


** 

Hello list, 

I'm having a bit of an issue with converting MS AD's long int timestamp values 
with Remedy means only. 

What works ok is displaying the value as such in Remedy decimal field (double). 
For example the lastLogonTimestamp attribute may be 128109070370591753, which 
is something like the 18th of December.

What does not work at all is displaying the value in a Remedy date/time value 
directly (instead of the decimal), or trying to "set fields" that value from 
the decimal field into a date/time field.

The DateAdd function can't be used at it seems too / does not work, as Remedy 
does not understand those long int values (apart from that it seems that you 
can't use 1.1.1601 as a DateBase - this could be cured though, by just adding 
the difference from this date until for example 1.1.2000 in days - but still, 
the format of the long int does not work).

Using VB.net the function could look like: 
        Dim logonsec As Double 
        Dim logondate As Date 
        Dim baseDate As Date = CDate("1.1.1601") 
        logonsec = (128111630542558000) / (10000000) 
        logondate = baseDate.AddSeconds(logonsec) 

Logondate then results in that 18th of December at VB. 


Has someone run into this yet ? Perhaps there is another easy formula which 
works for converting this values ? ...I think using the Filter API might also 
work (have not tried yet). Something I wanted to avoid, as of having to trigger 
a save somewhere (but would go that route anyway, if that would then work).

Am running the test box at 7.0.1p0 at the moment (used to be 6.3p19 this 
morming), as of "SW00246651    ARServer needs some mechanism to determine when 
large LOB's are fetched". But upgrading has not cured the baviour so far.


Thanks and happy holidays all together from Germany ! 


Robert 

.......................................................... 
Mit freundlichem Gruß / Kind regards 
Robert Kern 
Siemens AG 
GIO IT SHS 3 BO ST 
Sodener Straße 9 
65824 Schwalbach 
Germany 
Tel. +49 619 687 2546 
Fax +49 619 687 792 546 
E-Mail: [EMAIL PROTECTED] 
Internet: http://www.siemensvdo.com <http://www.siemensvdo.com>  

__20060125_______________________This posting was submitted with HTML in it___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to