convertTimeStampToDateString static method

String convertTimeStampToDateString(
  1. int microseconds,
  2. String format
)

Converts a timestamp represented as microseconds since epoch to a formatted date string. @param microseconds The timestamp to convert, represented in microseconds since epoch. @param format The desired format of the output date string. @return The formatted date string representing the converted timestamp.

Implementation

static String convertTimeStampToDateString(int microseconds, String format) {
  var calendar = DateTime.fromMicrosecondsSinceEpoch(microseconds);
  return DateFormat(format).format(calendar);
}