Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert.ToDateTime Method (Int64)
Message
 
To
17/07/2003 02:11:59
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00810877
Message ID:
00811160
Views:
14
>>Scanning the .NET help files, help for the Convert.ToDateTime Method (Int64) returns the following information:
>>
>>"This conversion is not supported..."
>>
>>What's up with this?
>>
>>Specifically, I am writing a VB.NET routine that is querying Active Directory. First of all, I can't understand why the following AD fields are of data type Long:
>>    badpasswordTime
>>    pwdlastset
>>    usncreated
>>    accountexpires
>>    lastlogoff
>>    usnchanged
>>
>>...while the following fields are of data type Date:
>>    whencreated
>>    whenchanged
>>
>>They should all be date-time values shouldn't they?
>>
>>It wouldn't be a problem if the routine mentioned in the subject of this email were available, but it's not. How would one go about converting one of these 64-bit signed integer values to its equivalent DateTime format value (using VB.NET)?
>>
>>Thanks in advance!
>
>Kile,
>
>This might get you started: http://www.dotnet247.com/247reference/msgs/19/96138.aspx

Keith,

I found a link that details the topic in a bit more depth:
http://x220.win2ktest.com/forum/topic.asp?TOPIC_ID=2524

The examples are in VB script though, so there is some implicit typecasting they're getting away with that isn't working in VB.NET.

I did find the ability to cast as LargeInteger (and LargeIntegerClass) by adding a reference to the COM ActiveDS.tlb. However, I get "Specified cast is invalid" anytime I try to cast anything to it.

Still searching...

- Kile
Previous
Reply
Map
View

Click here to load this message in the networking platform