You need to sign in to do that
Don't have an account?
Santosh Uppala
convert c# ticks method to apex
Hi All,
I am trying to convert c# ticks mehtod of datetime in apex. Document says that getime() method will work as ticks method of C#, but when i try to compare both results its coming different. So can any who is familiar with it help me on it?
Here is the code.
C#:
long time = DateTime.Now.Ticks;
Console.WriteLine(time);
O/P : 636297691874640148
Apex Code:
DateTime dt = system.Now();
long ticks = dt.getTime();
O/p : 1494165245354
As you can see above there is a difference in the output. So please let me know where i am doing a mistake.
Thanks in Advance !!
I am trying to convert c# ticks mehtod of datetime in apex. Document says that getime() method will work as ticks method of C#, but when i try to compare both results its coming different. So can any who is familiar with it help me on it?
Here is the code.
C#:
long time = DateTime.Now.Ticks;
Console.WriteLine(time);
O/P : 636297691874640148
Apex Code:
DateTime dt = system.Now();
long ticks = dt.getTime();
O/p : 1494165245354
As you can see above there is a difference in the output. So please let me know where i am doing a mistake.
Thanks in Advance !!