Class SpannerDate (7.5.0)

Inheritance

Date >SpannerDate

Package

@google-cloud/spanner

Example

Spanner.date('3-3-1933');

Constructors

(constructor)(dateString)

constructor(dateString?:string);

Constructs a new instance of theSpannerDate class

Parameter
NameDescription
dateStringstring

(constructor)(year, month, date)

constructor(year:number,month:number,date:number);

Constructs a new instance of theSpannerDate class

Parameters
NameDescription
yearnumber
monthnumber
datenumber

Methods

toJSON()

toJSON():string;

Returns the date in ISO date format.YYYY-MM-DD

Returns
TypeDescription
string

{string}

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.