Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: timedate NDS
Sample code listed.
AddExtender("wwn4x34I.dll") dCONTEXT = AskLine ("Information Handler", "What Context do you wish to Grab User Data from?", "") objects = n4ObjectList(dCONTEXT, "", "USER", "") count = ItemCount(objects, @TAB) For i = 1 To count UserID = ItemExtract(i, objects, @TAB) Tvalue = n4ObjectProps(dCONTEXT, UserID, "Last Login Time") ; Seconds=TimeDiffSecs(TimeYmdHms(), "1980:01:01:00:00:00") ; Message("Seconds from Jan 01, 1980", Seconds) Now=TimeAdd("1970:01:01:10:00:00","00:00:00:00:00:%Tvalue%") Message(UserId, Now) IniWritePvt("Users", UserID, Now, "c:\windows\temp\test.ini") Next display (2, "Yes", "Done")Data with same user logging in and out several times:
[Users] # UserId NDS data NDS Time Diff 1 dachadwi = 899407965 7/2/98 02:37:20 pm 2 dachadwi = 899408240 7/2/98 02:39:39 pm 275 3 dachadwi = 899408379 7/2/98 02:40:54 pm 138 4 dachadwi = 899408454 7/2/98 02:42:18 pm 75 5 dachadwi = 899408538 7/2/98 02:47:46 pm 84
I'm wondering about:
Now=TimeAdd("1970:01:01:10:00:00","00:00:00:00:00:%Tvalue%")I can understand the 1/1/1970 part, but what is with the 10:00 AM part. If that is a GMT offset, I think it would be in the middle of the Pacific ocean.
Sort of looks like previous - not current - login time.
AddExtender("wwn4x34I.dll") P1 = "%PARAM1%" IF P1 == "" THEN MESSAGE("Syntax Error", "Usage NDSLIST d:\path\filename") P1 = "c:\windows\temp\test.ini" EndIf dCONTEXT = AskLine ("Information Handler", "What Context do you wish to Grab User Data from?","") :oagain CLIST = n4ObjectList(dCONTEXT, "", "", "") Object = askitemlist("Select an Object.", CLIST, @TAB, @sorted,@single) if Object == "" then Message("Information Handler","You must select an object, Try again.") goto oagain Endif PROP= n4ObjectProps(dCONTEXT, Object, "") Oprop = askitemlist("Select a Property.", PROP, @TAB, @sorted,@single) Ovalue = n4ObjectProps(dCONTEXT, Object, Oprop) if Oprop == "" then count = ItemCount(Ovalue, @TAB) For I = 1 To count Oproperty = ItemExtract(I, Ovalue, @TAB) Tvalue = n4ObjectProps(dCONTEXT, Object, Oproperty) IniWritePvt(Object, Oproperty, Tvalue, P1) Next Message("Information Handler","Finished gathering information on Object") Endif If Oprop == "" then goto done Message(Object, Ovalue) IniWritePvt("Object Info", Object, Ovalue, P1) :done
Article ID: W13601
Filename: Getting Proper TimeDate out of NDS.txt
File Created: 2001:03:01:13:45:30
Last Updated: 2001:03:01:13:45:30