R
raghu1
How to convert a given date to its equvalent ticks.:
string d="5/15/2006 12:10:44 PM";
// string 2 date ...
dt=Convert.ToDateTime(d);
// Date 2 ticks ...
dt2ticks=dt.Ticks;
string ticks = Convert.ToString(dt2ticks);
Console.WriteLine("Input date: {0} Ticks: {1} ",d, ticks);
Though there is no error, I get the wrong ticks:
632832918440000000
This ticks number is used to query AD: last logon time (ADSI) and it is
not giving correct results.
I was trying to build a small console apps where in the date in
mm/dd/yyyy format is a command line parameter and the apps prints out
the equvalent ticks ???
string d="5/15/2006 12:10:44 PM";
// string 2 date ...
dt=Convert.ToDateTime(d);
// Date 2 ticks ...
dt2ticks=dt.Ticks;
string ticks = Convert.ToString(dt2ticks);
Console.WriteLine("Input date: {0} Ticks: {1} ",d, ticks);
Though there is no error, I get the wrong ticks:
632832918440000000
This ticks number is used to query AD: last logon time (ADSI) and it is
not giving correct results.
I was trying to build a small console apps where in the date in
mm/dd/yyyy format is a command line parameter and the apps prints out
the equvalent ticks ???