View Single Post
  #1 (permalink)  
Old June 4th, 2005, 01:18 AM
chandu80 chandu80 is offline
Registered User
 
Join Date: Jan 2005
Location: Bangalore, Karnataka, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to chandu80
Default Converting Seconds into Nano seconds and viceversa

Hi,

I am Using Active Directory for authentication for my aspx page.
Now i want to determine when the password expires in active directory and how many days left.

The problem is In active directory it is saved as number of seconds elapsed from Jan 1, 1970.
But in .net elapsed time is from jan 01, 01. And returning as number of nano seconds(using Ticks property).
Both as 18 digit numbers, but one is in seconds and other is in nanoseconds. how can i match both. How can i find the difference of these dates/times .

How to convert nanoseconds to date and seconds to date. I need to match these two.

Please help me. Thank you
Reply With Quote