Timestamp.fromDate constructor

Timestamp.fromDate(
  1. DateTime date
)

Create a Timestamp from DateTime instance

Implementation

factory Timestamp.fromDate(DateTime date) {
  return Timestamp.fromMicrosecondsSinceEpoch(date.microsecondsSinceEpoch);
}