https://github.com/efimovalex/odt
Golang Other Date Types
https://github.com/efimovalex/odt
date golang json sql time
Last synced: about 2 months ago
JSON representation
Golang Other Date Types
- Host: GitHub
- URL: https://github.com/efimovalex/odt
- Owner: efimovalex
- License: mit
- Created: 2019-07-04T11:26:47.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T08:16:41.000Z (almost 5 years ago)
- Last Synced: 2025-03-27T23:30:35.577Z (over 1 year ago)
- Topics: date, golang, json, sql, time
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang Other Date Types
[](https://travis-ci.org/efimovalex/odt)
[](https://goreportcard.com/report/github.com/efimovalex/odt) [](https://codecov.io/gh/efimovalex/odt) [](https://godoc.org/github.com/efimovalex/odt)
Golang Other Date Types
Golang Library that translates between `DATE` and `TIME` SQL types and JSON encoding.
Features:
- automatically converts json to mysql scannable struct for DATE and TIME types
- can change the format read from the json
## Example:
Look in the [example folder](example/main.go)
## Change formats:
```
odt.SetDateFormat("01/02/2006")
odt.SetTimeFormat("22-22-22")
```