Table of Contents

Method ToMillisecondsSinceEpoch

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

ToMillisecondsSinceEpoch(DateTime)

Converts a DateTime to number of milliseconds since Unix epoch.

public static long ToMillisecondsSinceEpoch(DateTime dateTime)

Parameters

dateTime DateTime

A DateTime.

Returns

long

Number of milliseconds since Unix epoch.