# precision

Industry: Core

## [calculate](/gmt/reference/precision/calculate/)

- [`truncateNanoseconds`](/gmt/reference/precision/calculate/truncateNanoseconds/): Truncate nanoseconds since the Unix epoch to the precision a store can actually hold.

## [convert](/gmt/reference/precision/convert/)

- [`fromArrowLocalTimestamp`](/gmt/reference/precision/convert/fromArrowLocalTimestamp/): Convert the `int64` of an Apache Arrow `Timestamp` column that has no timezone to a wall-clock date-time string.
- [`fromArrowTimestamp`](/gmt/reference/precision/convert/fromArrowTimestamp/): Convert the `int64` of an Apache Arrow `Timestamp` column that has a timezone to a UTC instant string.
- [`fromDotNetTicks`](/gmt/reference/precision/convert/fromDotNetTicks/): Convert .NET `DateTime.Ticks` back to an ISO 8601 instant string.
- [`fromExcelSerial`](/gmt/reference/precision/convert/fromExcelSerial/): Convert an Excel day serial back to an ISO 8601 instant string.
- [`fromFileTime`](/gmt/reference/precision/convert/fromFileTime/): Convert a Windows `FILETIME` back to an ISO 8601 instant string.
- [`fromNanoseconds`](/gmt/reference/precision/convert/fromNanoseconds/): Convert nanoseconds since the Unix epoch back to an ISO 8601 string.
- [`fromNtpTimestamp`](/gmt/reference/precision/convert/fromNtpTimestamp/): Convert a 64-bit NTP timestamp (RFC 5905) back to an ISO 8601 instant string.
- [`fromParquetInt96`](/gmt/reference/precision/convert/fromParquetInt96/): Convert a Parquet `INT96` timestamp back to an ISO 8601 instant string.
- [`fromPgMicroseconds`](/gmt/reference/precision/convert/fromPgMicroseconds/): Convert PostgreSQL's internal `timestamptz` value back to an ISO 8601 instant string.
- [`fromProtoDuration`](/gmt/reference/precision/convert/fromProtoDuration/): Convert a protobuf `google.protobuf.Duration` record back to an ISO 8601 duration string.
- [`fromProtoTimestamp`](/gmt/reference/precision/convert/fromProtoTimestamp/): Convert a protobuf `google.protobuf.Timestamp` record back to an ISO 8601 instant string.
- [`toArrowLocalTimestamp`](/gmt/reference/precision/convert/toArrowLocalTimestamp/): Convert an ISO 8601 plain date-time to the `int64` of an Apache Arrow `Timestamp` column that has no timezone.
- [`toArrowTimestamp`](/gmt/reference/precision/convert/toArrowTimestamp/): Convert an ISO 8601 instant string to the `int64` of an Apache Arrow `Timestamp` column that has a timezone.
- [`toDotNetTicks`](/gmt/reference/precision/convert/toDotNetTicks/): Convert an ISO 8601 instant string to .NET `DateTime.Ticks`.
- [`toExcelSerial`](/gmt/reference/precision/convert/toExcelSerial/): Convert an ISO 8601 instant string to an Excel day serial.
- [`toFileTime`](/gmt/reference/precision/convert/toFileTime/): Convert an ISO 8601 instant string to a Windows `FILETIME`.
- [`toNanoseconds`](/gmt/reference/precision/convert/toNanoseconds/): Convert an ISO 8601 instant string to nanoseconds since the Unix epoch.
- [`toNtpTimestamp`](/gmt/reference/precision/convert/toNtpTimestamp/): Convert an ISO 8601 instant string to a 64-bit NTP timestamp (RFC 5905).
- [`toParquetInt96`](/gmt/reference/precision/convert/toParquetInt96/): Convert an ISO 8601 instant string to a Parquet `INT96` timestamp record.
- [`toPgMicroseconds`](/gmt/reference/precision/convert/toPgMicroseconds/): Convert an ISO 8601 instant string to PostgreSQL's internal `timestamptz` value.
- [`toProtoDuration`](/gmt/reference/precision/convert/toProtoDuration/): Convert an ISO 8601 duration string to a protobuf `google.protobuf.Duration` record.
- [`toProtoTimestamp`](/gmt/reference/precision/convert/toProtoTimestamp/): Convert an ISO 8601 instant string to a protobuf `google.protobuf.Timestamp` record.

## [format](/gmt/reference/precision/format/)

- [`formatNanoseconds`](/gmt/reference/precision/format/formatNanoseconds/): Format nanoseconds since the Unix epoch as a decimal string, for JSON and other text transports.

## [identifiers](/gmt/reference/precision/identifiers/)

- [`fromKsuid`](/gmt/reference/precision/identifiers/fromKsuid/): Read the instant a KSUID carries (segmentio/ksuid, `ksuid.go` and `base62.go`).
- [`fromObjectId`](/gmt/reference/precision/identifiers/fromObjectId/): Read the creation second a MongoDB ObjectId carries (mongodb/specifications `bson-objectid/objectid.md`, § Specification and § Timestamp Field).
- [`fromSnowflake`](/gmt/reference/precision/identifiers/fromSnowflake/): Read the instant a Snowflake id carries, using a layout the caller supplies.
- [`fromUlid`](/gmt/reference/precision/identifiers/fromUlid/): Read the instant a ULID carries (ulid/spec README, § Components and § Canonical String Representation).
- [`fromUuidTimestamp`](/gmt/reference/precision/identifiers/fromUuidTimestamp/): Read the instant a version 1, 6 or 7 UUID carries (RFC 9562 §5.1, §5.6, §5.7).
- [`ulidTimestampPrefix`](/gmt/reference/precision/identifiers/ulidTimestampPrefix/): The first 10 characters of every ULID minted in the same millisecond as an instant, for range scans over stored ULID text (ulid/spec README, § Components and § Encoding).
- [`uuidV7TimestampPrefix`](/gmt/reference/precision/identifiers/uuidV7TimestampPrefix/): The first 13 characters of every version 7 UUID minted in the same millisecond as an instant, for range scans over stored UUID text (RFC 9562 §5.7, §6.11).

## [parse](/gmt/reference/precision/parse/)

- [`parseNanoseconds`](/gmt/reference/precision/parse/parseNanoseconds/): Parse a decimal string produced by `formatNanoseconds` — typically one field of a JSON payload — back to nanoseconds since the Unix epoch.

## [validate](/gmt/reference/precision/validate/)

- [`isValidInstant`](/gmt/reference/precision/validate/isValidInstant/): Validate whether a string is an ISO 8601 instant string the `precision/` namespace accepts.
- [`isValidInt64NanosecondDateTime`](/gmt/reference/precision/validate/isValidInt64NanosecondDateTime/): Validate whether a string is a plain date-time whose epoch-nanosecond count, read as if it were UTC (Arrow's rule for a zoneless timestamp), fits an `int64`: the check to run before `toArrowLocalTimestamp(dateTime, "nanosecond")`.
- [`isValidInt64NanosecondInstant`](/gmt/reference/precision/validate/isValidInt64NanosecondInstant/): Validate whether a string is an instant whose epoch-nanosecond count fits an `int64`: the check to run before `toArrowTimestamp(isoString, "nanosecond")`.
- [`isValidNanoPattern`](/gmt/reference/precision/validate/isValidNanoPattern/): Validate whether a string is a nanosecond timestamp `parseNanoseconds` will parse.
- [`isValidNanoseconds`](/gmt/reference/precision/validate/isValidNanoseconds/): Validate whether a value is an epoch-nanosecond `bigint` the `precision/` namespace accepts.
