Skip to content

Inserting Date values into Spanner date column fails #2097

@jgeewax

Description

@jgeewax

What I want to do:

myTable.insert({id: 1, start_date: new Date(1976, 4, 1)}).then(function (data) {
  console.log(data);
});

What I have to do instead :(

myTable.insert({id: 1, start_date: '1976-04-01'},).then(function (data) {
  console.log(data);
});

Can we make dates do "the right thing" ? Or is that not possible?

Metadata

Metadata

Labels

api: spannerIssues related to the Spanner API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions