On this page
  1. sqlite3.Timestamp
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

sqlite3.Timestamp

Prev: sqlite3.TimeFromTicks | Up: sqlite3 | Next: sqlite3.TimestampFromTicks
Rel: sqlite3.adapt, sqlite3.Binary, sqlite3.Blob, sqlite3.complete_statement
Ref: docs.python.org — sqlite3.Timestamp
Tags: #public #python3 #stdlib #sqlite3


Import

import sqlite3
from sqlite3 import Timestamp

Signature & Overview

sqlite3.Timestamp(...)

The year, month and day arguments are required. tzinfo may be None, or an instance of a tzinfo subclass. The remaining arguments may be ints.

Methods & Attributes

Usage

import datetime
import sqlite3

ts = sqlite3.Timestamp(2026, 12, 2, 17, 30, 0)
assert ts == datetime.datetime(2026, 12, 2, 17, 30, 0)

Gotchas

REPL Inspect

from sqlite3 import Timestamp
help(Timestamp)

Linked from

Related notes