JsonUtility.DateTicksToJsTicks method
Converts an Int64 that corresponds to the value of a Ticks property of a DateTime to an Int64 that, when passed into an ECMAScript (JScript, JavaScript) Date object’s setTime method, will result in the ECMAScript Date representing the same date and time as the DateTime.
Namespace: Microsoft.SharePoint.JsonUtilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function DateTicksToJsTicks ( _
dateTicks As Long _
) As Long
'Usage
Dim dateTicks As Long
Dim returnValue As Long
returnValue = JsonUtility.DateTicksToJsTicks(dateTicks)
public static long DateTicksToJsTicks(
long dateTicks
)
Parameters
dateTicks
Type: System.Int64Ticks in C#.
Return value
Type: System.Int64
A value that corresponds to the return value of an ECMAScript Date object’s getTicks method (number of milliseconds since 1/1/1970 12:00AM.)
Remarks
This method works by converting the number of nanoseconds since 1/1/0001 12:00AM to the number of milliseconds since 1/1/1970 12:00AM.