database/sql: Provide format string for SQL dates, times, and datetimes #30991
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Go helpfully declares a predefined format string for parsing and formatting RFC3339 timestamps. Unfortunately, SQL uses a slightly different format, essentially replacing the
T
separator with a space. So, it would be helpful for the database/sql` package to provide format strings for reliably parsing and formatting SQL dates/times/datetimes. For example:Higher level API's supposedly offer automatic marshaling between SQL literals and Go objects, such as ORM's and special SQL driver options. However, sometimes lower level access is needed. In these cases, it is helpful to be able to use a predefined, tested format string rather than having to write our own.
The text was updated successfully, but these errors were encountered: