Converting Seconds into Nano seconds and viceversa
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