Npgsql.NodaTime 10.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Npgsql.NodaTime --version 10.0.0
                    
NuGet\Install-Package Npgsql.NodaTime -Version 10.0.0
                    
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.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Npgsql.NodaTime" Version="10.0.0" />
                    
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.0
                    
#r "nuget: Npgsql.NodaTime, 10.0.0"
                    
#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.0
                    
#: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.0
                    
Install as a Cake Addin
#tool nuget:?package=Npgsql.NodaTime&version=10.0.0
                    
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

Rocket.Surgery.Extensions.Marten

Package Description

Lobster.Boot

LobsterBoot核心类库

PostgreSQLCopyHelper.NodaTime

A library for Bulk Copy / Bulk Inserts with PostgreSQL.

GitHub repositories (6)

Showing the top 6 popular GitHub repositories that depend on Npgsql.NodaTime:

Repository Stars
JasperFx/marten
.NET Transactional Document DB and Event Store on PostgreSQL
linq2db/linq2db
Linq to database provider.
npgsql/efcore.pg
Entity Framework Core provider for PostgreSQL
PluralKit/PluralKit
PostgreSQLCopyHelper/PostgreSQLCopyHelper
Simple Wrapper around Npgsql for using PostgreSQL COPY functions.
NosCoreIO/NosCore
NosCore is a Nostale emulator in c# (.Net 9) using DotNetty / Entity Framework / WebAPI / Autofac / Mapster / Serilog
Version Downloads Last Updated
10.0.1 1,580 12/19/2025
10.0.0 49,326 11/22/2025
10.0.0-rc.1 6,468 10/5/2025
9.0.4 135,332 10/5/2025
9.0.3 1,386,726 2/24/2025
9.0.2 468,704 12/7/2024
9.0.1 109,530 11/19/2024
9.0.0 36,026 11/18/2024
8.0.8 29,012 10/5/2025
8.0.7 166,750 2/24/2025
8.0.6 651,902 11/18/2024
8.0.5 496,774 10/13/2024
8.0.4 203,735 9/10/2024
8.0.3 1,151,192 5/9/2024
8.0.2 456,618 2/10/2024
8.0.1 86,746 12/4/2023
8.0.0 487,922 11/21/2023
8.0.0-rtm 213 11/20/2023
8.0.0-rc.2 15,793 10/11/2023
8.0.0-preview.4 10,771 5/17/2023
8.0.0-preview.3 528 4/24/2023
8.0.0-preview.2 617 3/20/2023
8.0.0-preview.1 731 3/3/2023
7.0.10 25,596 3/17/2025
7.0.9 35,234 11/18/2024
7.0.8 27,281 9/10/2024
7.0.7 82,263 5/9/2024
7.0.6 517,778 9/14/2023
7.0.4 597,743 4/24/2023
7.0.2 522,966 2/15/2023
7.0.1 381,867 12/17/2022
7.0.0 115,653 11/9/2022
7.0.0-rc.2 4,105 10/11/2022
7.0.0-rc.1 1,297 9/16/2022
7.0.0-preview.7 2,482 8/9/2022
7.0.0-preview.6 993 7/13/2022
7.0.0-preview.5 778 6/19/2022
7.0.0-preview.4 1,069 5/11/2022
7.0.0-preview.3 873 4/19/2022
7.0.0-preview.2 667 3/16/2022
7.0.0-preview.1 672 2/17/2022
6.0.13 45,118 11/18/2024
6.0.12 28,174 9/10/2024
6.0.11 73,526 5/9/2024
6.0.10 112,144 9/14/2023
6.0.9 162,083 2/15/2023
6.0.8 280,177 12/17/2022
6.0.7 403,724 9/16/2022
6.0.6 513,273 8/4/2022
6.0.5 260,496 6/19/2022
6.0.4 381,969 4/19/2022
6.0.3 431,327 1/27/2022
6.0.2 291,913 12/20/2021
6.0.1 354,516 12/3/2021
6.0.0 134,328 11/9/2021
6.0.0-rc.2 1,582 10/14/2021
6.0.0-rc.1 1,592 9/24/2021
6.0.0-preview7 2,550 8/16/2021
6.0.0-preview6 978 7/31/2021
6.0.0-preview5 1,788 7/1/2021
6.0.0-preview4 1,040 5/27/2021
6.0.0-preview3 1,020 4/15/2021
6.0.0-preview2 13,647 3/11/2021
5.0.18 26,163 5/9/2024
5.0.17 26,108 9/14/2023
5.0.16 24,979 2/15/2023
5.0.15 25,210 9/16/2022
5.0.14 26,831 6/19/2022
5.0.13 25,591 4/26/2022
5.0.12 41,724 2/1/2022
5.0.11 92,956 11/12/2021
5.0.10 354,929 9/15/2021
5.0.7 331,050 6/13/2021
5.0.5 117,155 5/11/2021
5.0.4 279,501 3/25/2021
5.0.3 173,342 1/26/2021
5.0.2 229,831 1/19/2021
5.0.1.1 89,687 12/12/2020
5.0.0 58,482 11/15/2020
5.0.0-preview1.1 4,625 10/13/2020
5.0.0-alpha1 842 6/17/2020
4.1.14 24,832 5/18/2024
4.1.13 24,621 5/9/2024
4.1.12 31,405 6/19/2022
4.1.11 25,697 4/26/2022
4.1.9 124,047 4/6/2021
4.1.8 102,166 1/21/2021
4.1.7 25,876 12/12/2020
4.1.6 190,827 11/15/2020
4.1.5 121,188 9/28/2020
4.1.4 174,052 7/19/2020
4.1.3 492,247 1/31/2020
4.1.2 130,154 11/14/2019
4.1.1 84,200 10/2/2019
4.1.0 34,377 9/26/2019
4.1.0-preview2 3,074 9/4/2019
4.1.0-preview1 1,627 8/15/2019
4.0.17 24,573 6/10/2024
4.0.16 24,437 5/18/2024
4.0.15 24,412 5/18/2024
4.0.14 24,437 5/9/2024
4.0.13 24,863 6/19/2022
4.0.11 24,995 7/19/2020
4.0.10 64,047 9/9/2019
4.0.9 35,599 8/14/2019
4.0.8 26,972 7/18/2019
4.0.7 154,364 5/21/2019
4.0.6 26,581 4/11/2019
4.0.5 36,377 3/3/2019
4.0.4 94,208 12/6/2018
1.0.0 220,397 5/30/2018
1.0.0-rc1 2,196 5/8/2018
1.0.0-preview1 3,451 3/22/2018