p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   General .NET (http://p2p.wrox.com/forumdisplay.php?f=122)
-   -   Converting Seconds into Nano seconds and viceversa (http://p2p.wrox.com/showthread.php?t=30068)

chandu80 June 4th, 2005 01:18 AM

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

All times are GMT -4. The time now is 10:22 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.