Cmdlets for MongoDB

Build 25.0.9434

DatetimeFormat Parameter (Connect-MongoDB Cmdlet)

Determines the format of datetime values returned by the Document function. This property only takes effect when StrictMode=true.

Syntax

Connect-MongoDB -DatetimeFormat string

Possible Values

Canonical, ISO8601, UnixTS

Data Type

cstr

Default Value

"Canonical"

Remarks

  • Canonical: According to MongoDB standards, for dates before the year 1970 or after the year 9999, the format will always be millis.
  • ISO8601: The format will always be ISO8601.
  • UnixTS: The format will always be millis.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434