Npgsql.NodaTime 10.0.3

Prefix Reserved
dotnet add package Npgsql.NodaTime --version 10.0.3
                    
NuGet\Install-Package Npgsql.NodaTime -Version 10.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Npgsql.NodaTime" Version="10.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Npgsql.NodaTime" Version="10.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Npgsql.NodaTime" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Npgsql.NodaTime --version 10.0.3
                    
#r "nuget: Npgsql.NodaTime, 10.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Npgsql.NodaTime@10.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Npgsql.NodaTime&version=10.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Npgsql.NodaTime&version=10.0.3
                    
Install as a Cake Tool

Npgsql is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.

This package is an Npgsql plugin which allows you to use the NodaTime date/time library when interacting with PostgreSQL; this provides a better and safer API for dealing with date and time data.

To use the NodaTime plugin, add a dependency on this package and create a NpgsqlDataSource. Once this is done, you can use NodaTime types when interacting with PostgreSQL, just as you would use e.g. DateTime:

using Npgsql;

var dataSourceBuilder = new NpgsqlDataSourceBuilder(ConnectionString);

dataSourceBuilder.UseNodaTime();

var dataSource = dataSourceBuilder.Build();
var conn = await dataSource.OpenConnectionAsync();

// Write NodaTime Instant to PostgreSQL "timestamp with time zone" (UTC)
using (var cmd = new NpgsqlCommand(@"INSERT INTO mytable (my_timestamptz) VALUES (@p)", conn))
{
    cmd.Parameters.Add(new NpgsqlParameter("p", Instant.FromUtc(2011, 1, 1, 10, 30)));
    cmd.ExecuteNonQuery();
}

// Read timestamp back from the database as an Instant
using (var cmd = new NpgsqlCommand(@"SELECT my_timestamptz FROM mytable", conn))
using (var reader = cmd.ExecuteReader())
{
    reader.Read();
    var instant = reader.GetFieldValue<Instant>(0);
}

For more information, visit the NodaTime plugin documentation page.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (23)

Showing the top 5 NuGet packages that depend on Npgsql.NodaTime:

Package Downloads
Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime

NodaTime support plugin for PostgreSQL/Npgsql Entity Framework Core provider.

Marten.NodaTime

NodaTime extension for Marten

PostgreSQLCopyHelper.NodaTime

A library for Bulk Copy / Bulk Inserts with PostgreSQL.

Rocket.Surgery.Extensions.Marten

Package Description

Lobster.Boot

LobsterBoot核心类库

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.3 126,640 5/27/2026
10.0.2 475,809 3/12/2026
10.0.1 229,884 12/19/2025
10.0.0 581,169 11/22/2025
10.0.0-rc.1 7,902 10/5/2025
9.0.5 3,744 3/12/2026
9.0.4 282,264 10/5/2025
9.0.3 2,181,411 2/24/2025
9.0.2 700,456 12/7/2024
9.0.1 181,116 11/19/2024
9.0.0 92,917 11/18/2024
8.0.9 20,787 3/12/2026
8.0.8 109,630 10/5/2025
8.0.7 229,382 2/24/2025
8.0.6 952,345 11/18/2024
8.0.5 615,120 10/13/2024
7.0.10 77,721 3/17/2025
7.0.9 85,812 11/18/2024
6.0.13 108,798 11/18/2024
6.0.12 79,116 9/10/2024
Loading failed